如果需要隐藏命令行窗口,在所编译的窗口程序上加入: #pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")