printf(\"n\");
printf(\"Change directory........n\");
if(_chdir(path1))
printf(\"Unable to locate the directory: %sn\", path1);
else
system(\"dir *.log /a\");
printf(\"n\");
return 0;
}
A sample output:

Running sample programs using Visual C++ Express Edition 2005, 2008 and Visual C++ 2005/Visual Studio 2008
利用 Visual C++ Express Edition 2005, 2008 and Visual C++ 2005/Visual Studio 2008来测试实例程序
For the above mentioned IDEs, you need to set the Character Set to Not Set else you need to change all the types
in the programs to Unicode. The following Figures show the project setting for the character set used in the project.
对于上面列举的IDE环境,你需要将字符集设定为Not Set,同样你还需要将程序变换成Unicode字符集类型。
下面的图向你展示如何进行设置项目属性。


Visual C++ Express Edition 2005

Visual C++ 2005 of the Visual Studio 2005