I'm trying to create a file when i run my program. So say i want to create a file called hello.txt and put my output in it.
What code would i write so that it would create that file?
Thanks for any help,
...Dan
I'm trying to create a file when i run my program. So say i want to create a file called hello.txt and put my output in it.
What code would i write so that it would create that file?
Thanks for any help,
...Dan
This should explain how to do what you want
No No's:
fflush (stdin); gets (); void main ();
Goodies:
Example of fgets (); The FAQ, C/C++ Reference
My Gear:
OS - Windows XP
IDE - MS Visual C++ 2008 Express Edition
ASCII stupid question, get a stupid ANSI
Thanks I'll take a look at it