how do i read and write to a .txt file? and code/tutorials would be greatly appreciated.
how do i read and write to a .txt file? and code/tutorials would be greatly appreciated.
Look up these functions in a C/C++ reference.
open()
read()
write()
close()
Kuphryn
Code:ofstream WriteFile; WriteFile.open("MyFile.txt", ios::out); if(!WriteFile.fail()) { WriteFile << "Hello world!" << endl; WriteFile.close(); }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
... or the tutorial based on this site:
http://www.cprogramming.com/tutorial/lesson10.html
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
... or you could read the faq!
So many options....