方法1:
在[mw_shl_code=c,true]return 0;[/mw_shl_code]这句前加一句[mw_shl_code=c,true]system("pause");[/mw_shl_code]
方法2:头文件处加一句[mw_shl_code=c,true]#include<windows.h>[/mw_shl_code],return 0;前加一句[mw_shl_code=c,true]Sleep(多少你自己根据情况定。毫秒为单位,1000毫秒=1秒);[/mw_shl_code]
方法3:在头文件处加这三句的任意一句
[mw_shl_code=c,true]
__stdcall Sleep(int);
void __stdcall Sleep(int);
__stdcall Sleep(float);
[/mw_shl_code]
,末尾加Sleep。
方法4:写函数
在main前写一个函数[mw_shl_code=c,true]void sleep(unsigned long x)
{
Sleep(x);
}[/mw_shl_code]
方法5:#include<windows.h>后末尾加_sleep。
方法够全的了。![](static/image/smiley/default/smile.gif) ![](static/image/smiley/default/smile.gif) ![](static/image/smiley/default/smile.gif) ![](static/image/smiley/default/smile.gif) ![](static/image/smiley/default/smile.gif) |