Lots and lots of help needed here!

Started by
18 comments, last by b0iNg 21 years, 1 month ago
That should be endl with the letter l, not end1 with the number 1. Besides that it looks alright.
Advertisement
Also Miserable is technically right - you don't have to have the line "using namespace std;" - but he forgot to mention that if you don't do it you have to put "std::" in front of "cout" and "endl" in your code instead.

If you have a book about C++ or can find a good tutorial online, read about namespaces. That will explain the reason behind all this.

Edit: I really need to do something about my posting diarrhea

[edited by - Dobbs on March 18, 2003 1:39:04 PM]
Erm guys..I dont know what I am doing wrong! I am receiving alot of errors when I compile! I dont know what kinda of errors it is. If someone can really help me, please drop me an email at jeff_lam10@hotmail.com

I have MSN, best if you have it too. I took a screenshot of the errors as it really is difficult to explain. If you can help me I''ll send you the screenshot.

In fact it shows that I have 70 errors! What the hell!? Argh...
Newbie Game Developer!
I just found out that alot of the problems seem to be caused by ! In fact when my code is:


  #include using namespace std;int main();{cout << "Hello World!" << endl;     return 0;}  


I only get 2 errors. First error is about the missing file that should be in front of #include. 2nd error is an error I dont quite understand - its an error of the first curly bracket, saying that it is a parse error? I dont understand. I got the screenshot though, so someone please try to contact me!

[edited by - b0iNg on March 19, 2003 9:00:29 AM]
Newbie Game Developer!
Remove the semicolon after int main()


// Website // Google // GameDev // NeHe // MSDN // OpenGL Extensions //
~neoztar "Any lock can be picked with a big enough hammer"my website | opengl extensions | try here firstguru of the week | msdn library | c++ faq lite
I just found out that no matter what, anything I compile seem to have a problem. Even the examples provided by Dev-C++..I open the project and compile it and it still has errors. So what does this mean?!?
Newbie Game Developer!
I have tried removing the semi colen...however it still says parse error..
Newbie Game Developer!
After #include you should have a file name, in this case iostream. Like this:


  #include <iostream>using namespace std;// etc.  
quote:Original post by b0iNg
I just found out that no matter what, anything I compile seem to have a problem. Even the examples provided by Dev-C++..I open the project and compile it and it still has errors. So what does this mean?!?



Are you using the newest version with GCC 3.2? If so, go to the Compiler Options, go to Directory Settings, select C++ Includes, and in the space provided at the bottom, write C:\Dev-Cpp\include\c++\mingw32 (if you didn''t install to the default location change it to reflect that) and click on Add.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Thanks alot smart_idiot! That works! Thanks!
Newbie Game Developer!

This topic is closed to new replies.

Advertisement