i hve bloodshed 5.0 dev-c++ compiler and it can compile the code in the tutorials 4 c++ on this site with not errors but they will not run not even the first simple program plz help me if u can
i hve bloodshed 5.0 dev-c++ compiler and it can compile the code in the tutorials 4 c++ on this site with not errors but they will not run not even the first simple program plz help me if u can
Last edited by onlinegeek; 12-14-2005 at 08:34 PM.
You have to make the program wait for a key press.
will work if you have:Code:cin.get();
if you don't have the namespace declared than do this:Code:using namespace std;
Code:std::cin.get();
i had both
using namespace std;
and i had a cin.get();
but its still doesn't work the program box doesn't even blink up the run icon blinks and if i run task manager while running the program it picks it up 4 a sec but the program box never appears have u ever heard of that. i can get it to work but the tutorial code on this site won't run idk y but it won't.
you want to show us the code that won't work? That might help.
i think this is it perfect ly going on memory text in quotes is diff bu that don't matterCode:#include <iostream> using namespace std; int main() { cout<<"hello world\n"; cin.get(); }
When you say dev-cpp 5.0 do you mean 4.9.9.2?
I copy and pasted that code into my dev-cpp 4.9.9.2 and it ran fine. I'm not sure why it isn't working for you.
Edit: When I say dev-cpp I mean dev-c++ (same thing).
yeah thats what i have my b well it might just be my puter becasue the same program worked about 4 months ago when i was orinally starting to learn c++ on my sis laptop much newer in the same program but i stoped when she made me delete the program and i recently started again on this comp and have had problems since the beginning well ty any hoot ill just learn it write it compile it then run it on a different computer ill find someone else i no who i can mooch a puter off of until i get m ne pc ty again
There are some other compilers out there, I use Visual C++ 2005 Express. It is free, well at least now it is. But it is a huge hastle to set up and there are a few anoying bugs in it. Otherwise I find it works alot better than dev-cpp. So maybe try anouther compiler first.
Edit: Although I read your post just fine, you should use periods and stuff and use corect spelling or if your like me use the best possible spelling with as little minor mistakes as possible. Maybe type a bit slower?
try replacing the cin.get(); with system("pause"); and see if that does anything
Registered Linux User #380033. Be counted: http://counter.li.org