+ 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.
4 odpowiedzi
+ 9
system() is platform-dependant.
https://stackoverflow.com/questions/1107705/systempause-why-is-it-wrong
+ 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 ;)
0
thx for all the answers 😊