I was wondering if its possible to specify the name of a file being created with a variable yet still specify the extension for the file.
Example:
string name;
cin >> name;
ofstream myfile;
myfile.open(name".sta", ios::out);
i was wondering if you could do something of the sort
i know you can do one or the either but i don't know if its possible to do both at the same time.
Nevermind i found the solution, i just had to take the same string and append .sta to it.