I need some help. I'm using an OpenFileDialog to get the the path of files.
I have the following lines:
String^ filenname = System::IO::Path::GetFileName(openFileDialog1->FileName);
String^ path = System::IO::Path::GetDirectoryName(openFileDialog1->FileName);
The path is perfect but I need the path in a char* so I did this:
char *filname=new char[path->Length];
However I get that the file doesn't exist(!)
the filname value looks like this:
the path value:
And the path->Length=8 ..so filname is 8 characters long:-s
If I write: char *filename=(char*)"D:\4.jpg" it works!:-s
What should I do?