【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.10.60 _chdir
Contents
Description
change the current working directory to the specified path
Syntax
int _chdir( const char * lpcszPath )
Parameters
- lpcszPath
- [input] Path of new working directory.
Return
0 if successful. A return value of -1 indicates that the specified path could not be found
Examples
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); } } }
Remark
Change the current working directory.
See Also
Header to Include
origin.h