What does system("pause") code in C++ means? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What does system("pause") code in C++ means?

I accidentally found this, when we need to use this? why Visual Studio and Dev-C++ can run this but codeblocks can't? Someone tell me about it, tq guys.

9th Dec 2017, 2:49 PM
Emi
Emi - avatar
3 Answers
9th Dec 2017, 3:39 PM
Hatsy Rei
Hatsy Rei - avatar
+ 4
you can use Console.Redkey(); in C# for wating the user to end the programm or im not quite sure but you can use cin.get(); too in C++ it works like system("pause"); and about your question why VS doesnt need that, its because VS compiler knows that automaticaly and you can also delete return 0; and it runs but not every IDE can do the same thing you know what i mean ;)
9th Dec 2017, 3:21 PM
moli42
moli42 - avatar
0
thx for all the answers 😊
10th Dec 2017, 2:41 AM
Emi
Emi - avatar