int a cin>>a; ofstream file; file.open("a.txt");
I want to create a .txt file with the code entered by the user. Please help.
Need to convert the input to std::string:
std::string
int a; cin>>a; ofstream file(std::to_string(a) + ".txt");