I\'m trying to hold the screen on my output using the header file
, but I don\'t know any equivalent function to the getch()
&
Late answer, you can use std::cin.get()
, this should work with most compilers. If that doesn't work, try adding another.
int main () {
// ...
std::cin.get();
std::cin.get();
return 0x00;
}
Using system("PAUSE")
is only available on Windows and is a bad programming habit. The reason for this is it literally pauses or freezes your program as opposed to just waiting for an input. ie. a keypress to exit.