A making file broblem.

Hello. From a utf-8 file reading a line with a file name, i must use that name to output stuff.
Name converting from wstring to string. Here ALLFILE is the string, but protfile1 not constructing on disk.
I have try olso and ofstream protfile1(ALLFILE.c_str()); but nothing...


1
2
3
4
5
6
string out="afile";
char buffer1[64];
strcpy(buffer1,ALLFILE.c_str());
cout<<buffer1<<endl;  // ok file name on screen
ofstream protfile(out.c_str()); // ok, file on disk ...
ofstream protfile1(buffer1);  // no file at all on disk ... 
Last edited on
Topic archived. No new replies allowed.