Laman

Rabu, 25 Juni 2014

how to pause/stop c/c++ program

C

Header File: stdio.h (C) or cstdio (C++)
When You write a program in C and using int as return value of main function:
add getch(); or getchar(); function before return 0;

C++

In C++ programming
add #include<cstdlib> in header file and add
system(“pause”);  function before end of program.