i m opening a file from a CFileDialog
char * ch1 = dlgOpen.GetFileName().LockBuffer();
char * ch2 = dlgOpen.GetFolderPath().LockBuffer();
and trying to get the full path and file name of the file as one ..but the code above keeps giving me error when i run the program..compiles..anyone tell me whats wrong ? or have a better way of doing what i want to do ?