Hi all:
I am a newbie, in a recent assignment, I was asked to generate a .h file in my program. May I ask how to do this? I really do not know anything about file I/O.
Thank you all
Hi all:
I am a newbie, in a recent assignment, I was asked to generate a .h file in my program. May I ask how to do this? I really do not know anything about file I/O.
Thank you all
just create a file with an h extension, and don't forget to include it in the source file in which you want to use it.
http://en.wikipedia.org/wiki/Header_file
Just to clear somthing up, file IO is usually:
When you actually read in a file to the program - not creating a header file. Just so you know the difference that all.Code:FILE*
Double Helix STL
Hi guys:
Thank you for your reply, but I think because I put my question the wrong way, it somewhat misled you.
Here it goes again:
In this assignment, I was asked to read from a text file and store whatever I read into an abstract data type (it may be a stack or queue or even mapping), and furthermore write the ADT to a .h file and save it.
What I want to know is:
Is there a function that creates a text file? Such as:
void CreateTextFile(myHeaderFile);
Thank you all
fopen opens a file. fclose closes it. If you're writing text, fprintf prints stuff to a file.
Cheers, will try it out.