+ 1
How can I input or output in a .txt file?
2 odpowiedzi
+ 2
#include <fstream> //for both writing and reading
create objects of that class ofstream or ifstream then use them with exertion or insertion operators
0
as example ifstream fd ("name.txt");
fd >> a >> b;
and dont forget to close at the end cause sometimes it can mess up
fd.close();