Hi Guys!~ I'm using a litle troubles now reading txt data from one directory (ifstream) and saving it to the directory I want (ofstream). How am I supposed to read one's Tetst.txt file information and to copy it to the new file DoneTest.txt in the brand new directory which should be created simultaneusly copying data to the file DoneTest.txt which would be also created there. It is ok if the folder already exists, but what should be done if it's not??
Please correct me on what I have done wrong?
void main(){
ifstream read("C:\\Test.txt"
ofstream write("C:\\newDir\\DoneTest.txt"
string s;
while(getline(read,s))
write<<s<<endl;
}
P.S. is it ok to place source codes in here?
Please correct me on what I have done wrong?
void main(){
ifstream read("C:\\Test.txt"
ofstream write("C:\\newDir\\DoneTest.txt"
string s;
while(getline(read,s))
write<<s<<endl;
}
P.S. is it ok to place source codes in here?