Lots and lots of help needed here!
That should be endl with the letter l, not end1 with the number 1. Besides that it looks alright.
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]
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...
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...
I just found out that alot of the problems seem to be caused by ! In fact when my code is:
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]
#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]
Remove the semicolon after int main()
// Website // Google // GameDev // NeHe // MSDN // OpenGL Extensions //
// Website // Google // GameDev // NeHe // MSDN // OpenGL Extensions //
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?!?
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.This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement