如何让控制台不显示出来 在main函数前添加一句: #pragma comment( linker, "/subsystem:"windows" /entry:"mainCRTStartup"" ) 即可。