1 设置GCC命令行使用环境变量:
SET GCC_HOME=E:\MinGW
SET PATH=%PATH%;GCC_HOME
SET LIBRARY_PATH=%GCC_HOME%\lib
SET C_INCLUDE_PATH=%GCC_HOME%\include
SET CPLUS_INCLUDE_PATH=%GCC_HOME%\include\c++\3.4.2;%GCC_HOME%\include\c++\3.4.2\mingw32;%GCC_HOME%\include\c++\3.4.2\backward;%GCC_HOME%\include
2 Demo.c
#include
int main()
{
printf("%6d",10);
printf("|\n");
printf("%-6d",10);
printf("|\n");
printf("%0.6d",10);
printf("|\n");
printf("%7.6d",10);
printf("|\n");
printf("%-7.6d",10);