Visual studio 2010 exiting after program ends

前端 未结 8 672
甜味超标
甜味超标 2021-02-04 13:44

I\'m trying out Visual studio 2010 by compiling a C program. After it displays the solution in the \"DOS\" command window, the window is immediately closed. In Visual studio 200

8条回答
  •  不知归路
    2021-02-04 14:26

    If you want it to stay open, you need to add code to your program. Like it

    #include 
    #include 
    
    ... main(...)
    {
        your codes
             .
             .
             .
    
         system("pause");
    
    }
    

    if you add this code ,your black screen stay at open. " system("pause") " inside the stdlib.h header file.

提交回复
热议问题