What is the difference between using system("pause") and cin.get(pause)? Oliver told me never use system("pause").
using namespace std;
string str = "My name is shridhar";
cout<<"What is your name"<<str;
char pause = 0;
cout << "Press enter to continue...";
One (system("pause")) involves asking the operating to run a system command and spawn a new process and the other simply waits for input to your program. They are about as different as night and day. As to which to use, cin.get() is usually preferred. If you do a quick Daniweb search on system("pause"), the reasons have been written up pretty well.