I dont want console to appear when i run c++ program

后端 未结 7 791
时光取名叫无心
时光取名叫无心 2021-02-07 11:24

I want to write one c++ program, compiling and linking .cpp gives .exe file. if i double click on that and execute it a console gets opened and closed. I don\'t want that consol

7条回答
  •  暖寄归人
    2021-02-07 11:50

    If you want to create a console type program with a hidden console, then make this the first line of your main routine:

    ShowWindow( GetConsoleWindow(), SW_HIDE );
    

提交回复
热议问题