change the current working directory to the specified path
int _chdir( const char * lpcszPath )
0 if successful. A return value of -1 indicates that the specified path could not be found
EX1
void chdir_ex1() { string strNewCurrentDir = "c:\\"; if (0 == _chdir(strNewCurrentDir)) { // If it succeded, display the new current directory: char szcurDirectory[MAXFULLPATH]; if ( _getcwd(szcurDirectory, MAXFULLPATH) != NULL ) { out_str(szcurDirectory); } } }
Change the current working directory.
origin.h