Advertisement

PLZ HELP!!!

Started by August 06, 2002 10:24 PM
45 comments, last by d2king10 22 years, 4 months ago
#include"iostream"
#include"cstdlib"
#include"conio.h"

int main(){
std::cout<<"stfu and get yourself a real compiler";
getch();
system("pause");
return 0;
}

this should work, else God is playing with you.

.lick
pipo, yes that one worked, but.....when i run it, it only says Press any key...then when i do it shuts off
Advertisement
ok, thats it....wat other FREE compilers are there cause this one is freakin screwey
quote: Original post by d2king10
pipo, yes that one worked, but.....when i run it, it only says Press any key...then when i do it shuts off


That''s what it''s supposed to do. If you don''t want it to kill the window after you run it, run it from a dos prompt.

quote:
ok, thats it....wat other FREE compilers are there cause this one is freakin screwey

The only other ones I can think of is DJGPP and I think Borland has a free C++ compiler.
Listen, it''s obviously compiling. If it''s not running try deleting the config files or edit them, and make sure that the path under LIB is the actual path on your system. I had exactly this problem.
Second, I just took a look at your screen shot and I noticed you have two different files in that project. Make sure only one of these files has a main! There can''t be two definitions of main in one program. If all you want is to compile a hello world or something similarly small (ex: 1 file programs) then just create that one file and compile. You don''t need to create a project for something like that. If you do however, create a project, make you specify empty project or console app.
Advertisement
If you still can''t get it to work after this, you can always download Dev-C++ 4 along with the 4.1 update. It runs pretty much bug free. After all, it''s not a beta like 5 is. So that''s another option.
Try the original code you had... but add

using namespace std;

before your main... maybe that might help

Sorry, I use VC++ So I am not sure what is wrong
Thanks
If your not gonna be doing any windows programming or the like, just go with DJGPP.
Hm...some pretty hokey replies up in here.

Just to let you know, I''m running Dev-C++ 4.9.5.0, and this code ran perfectly upon first compile:
#include <iostream>#include <stdlib.h>int main(){  std::cout << "Hello, world!\n";  system("PAUSE");	  return 0;}


Peace,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[twitter]warrenm[/twitter]

This topic is closed to new replies.

Advertisement