Hey all,
I've been kind of snooping this forum for a few days and I think its one of the best sources for information out on the web today, BTW: I'm loving all the links to C programming everyone is putting out, great reads :>
Anyhow, I'm sort of new to C programming and I have a question about Strings and Chars...
From what I've read for the past few months...
char *string /*will create a pointer to a char of
indeterminate size */
I'm trying to get a hang of file inputs and outputs.
1) Whats the best function to use to read from a file
that is 20 megs in size (A text file thank god).
2) Whats the best function to write to a file.
3) How does one create a new file that doesn't already
exist.
4) When prompting the user for the name of the file to be worked on, is it better to store the name of the file as a FILE * , or as a char[Max_size] w/ max_size = 100;
5) I'm also picking out of the files IP address's and host names, I'm curious in whats the best way to read these?
IE: 255.255.255.255 format out formats like whitehouse.gov
Any and all help is much appreciated and my thanks in advance.
Andrew
perihelion_mg@hotmail.com
I've been kind of snooping this forum for a few days and I think its one of the best sources for information out on the web today, BTW: I'm loving all the links to C programming everyone is putting out, great reads :>
Anyhow, I'm sort of new to C programming and I have a question about Strings and Chars...
From what I've read for the past few months...
char *string /*will create a pointer to a char of
indeterminate size */
I'm trying to get a hang of file inputs and outputs.
1) Whats the best function to use to read from a file
that is 20 megs in size (A text file thank god).
2) Whats the best function to write to a file.
3) How does one create a new file that doesn't already
exist.
4) When prompting the user for the name of the file to be worked on, is it better to store the name of the file as a FILE * , or as a char[Max_size] w/ max_size = 100;
5) I'm also picking out of the files IP address's and host names, I'm curious in whats the best way to read these?
IE: 255.255.255.255 format out formats like whitehouse.gov
Any and all help is much appreciated and my thanks in advance.
Andrew
perihelion_mg@hotmail.com