Hello I have tried to use system pause in my c program but it will only display press any key to continue. Any other ideas? (Dev cpp)
(The command prompt) because it opens the closes with regular code. And when I use cmd prompt it does not display anything (even though a printf is first)
if its not displaying anything when you run it via command prompt then theres something wrong with your code. What you probably should do is when it finishes, output a message along the lines of 'Press Q to quit' and then loop waiting for the user to press q.
Like let's take the hello world example. If you just put that in, should it work? My code compilesfine without errors so...dk
It's a while since I've used C/C++, but Code: int main(int argc, char* argv[]) { printf("Hello World!\n"); return 0; } will output 'Hello World' and terminate. A console program will always terminate on completion unless programmed otherwise.
Put some "getchar"s in there, otherwise the program will end without waiting for user input. #include <stdio.h> int main() { printf("Hello vivo"); getchar(); }