while the output of buf1 is "C:\testing\script\data\565656.txt"Code:char id[10]="565656"; char buf1[100] = "\"C:\\testing\\script\\data\\"; strcat(buf1,id); strcat(buf1,".txt\""); cout << buf1 ; ofstream filex(buf1); filex << "testing"; filex.close();
but the file have not created in the directory.
is the problem happened in ofstream filex(buf1)???