View Full Version : Can't Run Program.. Dev-C++
Rs-Gp-4U
02-10-2008, 08:59 AM
Hey guys im a C++ noob :P, I have Dev-C++ and my code is clear for any errors but as soon as i click run the program comes up :D ... for about 2 seconds then closes.. how can i fix this? PLEASE ANSWER ASAP..
EDIT: Heres code to prove its error-free
// © - Kizzop Productions 2008
// ****** Includes ******
#include <iostream.h>
// ****** Includes ******
// *** Variable ***
int Year = 2008;
// *** Variable ***
int main()
{
// ******************** What To Say ********************
cout << "Hello World.. The Year Is " << Year << endl;
// ******************** What To Say ********************
}
Wizzup?
02-10-2008, 09:13 AM
add this after your cout:
int f;
cin >> f;
The window will not close until you give it some keyboard input. ;)
Rs-Gp-4U
02-10-2008, 09:17 AM
Thanks!! "Wizzup?" FTW!! :D
Yakman
02-13-2008, 08:06 PM
I've un-deleted this thread.
Please don't delete your own thread if the question is solved, the whole point of a forum is so questions can be asked, and the answers stay there for someone else to read them, so that person doesnt have to post an identical thread to this one.
Have a nice day :)
add this after your cout:
Code:
int f;
cin >> f;The window will not close until you give it some keyboard input.
no no no thats a common misconseption. wat u need 2 do is put it in ur c:/ folder then go to cmd and type in (if the thing is named hello_world.exe) c:/hello_world
Rs-Gp-4U
03-16-2008, 11:04 AM
Thanks for replying a MONTH late ! and all you have to do is system("PAUSE>nul");
insanomano
05-28-2008, 02:07 AM
wooot good thing this is was undeleted cuz I was encountering the same error!!!!!! thanks Wizzup? :D your method helped lol
Bobarkinator
05-28-2008, 06:10 AM
Lets try not to grave dig
Smartzkid
05-29-2008, 03:54 AM
It helped him though, he was just saying thanks; Is that worthy of a gravedig? I'd say so...
man slaughter
05-29-2008, 03:35 PM
Lets try not to grave dig
you really love...(shuts tfu)
your not the firsst person who cant compile something. i had a bunch of programs i had made and now that i upgraded to vs 2008 i cant compile alot of them. to Smartzkid's well i guess so, but its been a while he probably dumped C++ or found a solution.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.