Hi,
I want to read/write data from a file and I don't know how (I'm using Visual studio c++). More exactly, if I have the following code:
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ofstream newfile;
newfile.open("exemplu.txt");
myfile<<"I want to write this in a file\n";
newfile.close();
return 0;
}
it compiles and it runs without errors but...where should I write the address of the file where I want to write te sentence "I want to write this in a file"
Thank you and...Happy Christmas! :)