|
|
|
#1 (permalink) | |||||||||||||
|
Overclocker
|
I just copied the original hello world program from the bloodshed guide, and when I compile and execute the program, the window that is supposed to stay open, just immediately closes, so I just see a quick flash of the output. What can I do to fix this?
Code:
#include <stdio.h>
int main()
{
printf("Hello Worldn");
return 0;
}
Last edited by mth91 : 02-04-08 at 11:05 PM. |
|||||||||||||
|
|
|
|
|
#2 (permalink) | |||||||||||||
|
Miscelaneous
|
It would help to tell us the language since many languages inherit from each other.
__________________
|
|||||||||||||
|
|
|
|
#3 (permalink) | |||||||||||||
|
Overclocker
|
Whoops, sorry, C++.
|
|||||||||||||
|
|
|
|
|
#4 (permalink) | |||||||||||||
|
Programmer
|
Code:
#include <stdio.h>
int main()
{
printf("Hello World\n");
system("PAUSE");
return 0;
}
__________________
"He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which." Douglas Adams
|
|||||||||||||
|
|
|
|
#5 (permalink) | |||||||||||||
|
AMD Overclocker
|
Safetydan, that will work, but from what I've read it puts a lot of stress onto the system as it has to call it and all this other stuff first. Not only that but that code will only work on Windows, not a *NIX based system. I was just looking for something like this today, you can always do something like this:
Code:
char reply; cout << "Press any key and then enter to quit: "; cin >> reply; return 0;
__________________
Volkswagen Enthusiasts of OCN Aumotocnic "An unfortunate member of the overclock.net insomnia club" Quebec Overclockers - 8019 in 3dMark06s939 Manny 4600+ @ 2809Mhz @ 1.425V (9 hours Orthos blend test stable - 24/7 Usage) - http://valid.x86-secret.com/show_oc.php?id=289741 @ 2945Mhz @ 1.45V - http://valid.x86-secret.com/show_oc.php?id=276669
|
|||||||||||||
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|