More File Creation Trouble
I was wondering how to create a file with multiple vars and text, for instance:
1 2 3 4
|
int number;
number = 1;
ofstream file;
file.open ("file"number.c_str()".txt");
|
stringstreams
1 2 3 4 5
|
stringstream ss;
int number = 1;
ss << "file" << number << ".txt";
file.open( ss.str().c_str() );
|
Thanks SO much!!
Topic archived. No new replies allowed.