Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how do you create, read and write to a text file
Posted

For instance using the stream classes provided by <fstream> header, as you may find in any C++ book (even bad ones). Examples here [^].
:)
 
Share this answer
 
v3
Just to note, fstream is C++, and the FileOpen, etc. methods are C and should NOT be used in C++ if you can at all avoid it.

And, of course, the core issue is that you need to buy a basic C++ book and read it.
 
Share this answer
 
CreateFile, ReadFile, WriteFile can be used.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900