Answer the question
In order to leave comments, you need to log in
How to set the path to create a file?
There was a question: the task of a way for creation of a file.
Tried to implement it like this:
string name, fullname, location;
ofstream file;
cout << "Введите имя: ";
cin.sync();
getline(cin, name);
getline(cin, location);
fullname = location + name;
file.open(fullname.c_str());
file.close();
fullname = ("C:\\Users\\Владимир\\Desktop\\") + name;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question