I have this function in C++:
void file_to_vect(double * a, char * name_file);
that takes in input a vector and writes it on the file whose name is specified by name_file. The problem is that I want to use this function on a file whose name changes. For example
file_to_vect(a,"file_18.txt")
Where the number after "file_" is not fixed. I've tried to do that by:
int n=18;
file_to_vect(a,"file_"+char(n)+".txt");
But it doesn't work. Any suggestion on how to fix this?