How can i get the file name to be the id number? I have tried ofstream a_file(id".txt"); but got an error. Thanks.
#include <iostream.h>
#include <fstream.h>
int main()
{
int id=0;
id++;
ofstream a_file("example.txt");
a_file<<"hello:
a_file.close();
return 0;
}