mercredi 16 décembre 2020

How to create ofstream file with the name of (integer type) variable?

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.

Aucun commentaire:

Enregistrer un commentaire