i am new to c++ and wonder about how i create a file for example
string flight;
cin>>flight;
flight=flight+".txt";
ofstream myfile;
myfile.open(flight);
instead of having a fixed name like myfile.open("file.txt")
but it doesnt work , are there elegant solutions to this problem i have. all the help is appreciated.