+ 9
Can you tell me how to pass a string to a file .txt? Thanks.
5 ответов
+ 6
#include <fstream>
int main (){
ofstream ofile ("test.txt")
ofile << "Hello world\n";
ofile << "Writing in the file";
ofile.close ();
}
+ 8
oh thank you very much
+ 5
What do you mean @Tobias?
+ 3
Welcome
- 1
You do the right thing and then u et the answer right but if I do the wrong thing, u get the answer wrong