abnormal termitionation of the program

Hello friends,

I am using the fallowing code for creating the directory but it results into the abnormal termination of the program.

_wchdir((const wchar_t *)tstrCurrentDirectory.c_str());

// Current destination dir
tstrCurrentDirectory += L"\\";

tstrCurrentDirectory += vDirectories[ nDirCount ];
////
// Create the new destination tstrDirectory
////
nres = _wmkdir((const wchar_t *)tstrCurrentDirectory.c_str());

In above code snippet the program get terminated from _wchdir function or sometimes _mkdir function.

What's wrong with above code any HELP.

Thanks in advance.
Your OS might be expecting a return value to see if the application executed properly or not. This is the same reason we insist that Main(...) return an integer here.
Topic archived. No new replies allowed.