PDA

View Full Version : การใช้คำสั่ง getch ในการหยุดหน้าจอหลังรันเสร็จ



asylu3
09-12-2004, 05:31 PM
[code]
#include < iostream.h >
#include < conio.h > //for getch()
void main()
{

Anonymous
18-12-2004, 05:41 PM
แนะนำอีกวิธีนึงครับ โดยการใช้ shell command ใน console



#include < cstdlib >
using namespace std;

int main(int argc, char* argv[])
{
/* wait for any key input here */
system("pause");
}

Anonymous
18-12-2004, 05:43 PM
ง่ะ ทำไมตรง include มันหายไปเนี่ย -_-'
เอาเป็นว่อย่าลืม include standard library (cstdlib) ก็แล้วกันครับ ก่อนใช้ฟังก์ชัน system()