I have recently started trying to learn C++ (as in today) and have been attempting the legendary hello world program. However i seem to be having little luck when trying to run the program. I will post the code i have below and the compiler i am using is called Dev-C++. I get an output messages after compiling which says
'Line = 32:2 File = C:\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h Message = #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 18.104.22.168 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.'
however i do not know how what this means so if anyone can help it will be greatly appreciated. this is my code below
cout << "Hello World!\n";
Good grief, eshwar, I've only been here three minutes and you've already spammed five threads.
Zaita is a professional developer and he knows what he is talking about. Can you really justify wasting time in someone's thread to tell him "forget language standards because they are too complex --use a seventeen year old piece of software instead"?
@ gnt101 et. al.
For more on system("PAUSE") take a look at the thread stickied at the top of this forum titled Console Closing Down.
I never use pause anymore. (Of course, I tend to run everything from the command-line...) But that's me. ;-)
@eshwar: Dev-C++ is an ideal IDE for a beginner developer. I am not making it "complex" but merely pointing out the cause-and-solution to the OP's problems. iosteam.h is now depreciated, unfortunately you are using a 15yr+ old compiler. While this may work for you, it'd be hard for you to become a proficient C++ developer because you will be unable to use any of the standard 3rd party libraries (e.g. Boost. which large pieces of is going to be part of new C++ standard). If you cannot use Dev-C++; perhaps you should give up trying to be a developer.
@Duoas: I dunno what they are teaching kids these days =\ makes me cringe
The best compiler/IDE is one that you can get on with.
At the moment I use Visual Studio Team System 2008, but that is because I am doing Windows development 99.9% of the time and don't have to worry about cross platform issues. For a free Windows only IDE I would recommend Visual C++ Express 2008.
The best (read "most standard-compliant") compiler is, of course, gcc in any of its incarnations.
For Windows-only development, the best IDE is Visual Studio. For cross-platform, my previous choice was Dev-C++, but now that it's dead, a new champion has appeared: Code::Blocks.
KDevelop is good for Linux and I've heard Anjuta is also good.
im also having a problem with my 'hello world'...
the program looks like this:
1 2 3 4 5 6 7 8 9
cout <<"Hello World from BCC 5.5\n";
the compiler im using is borland c++ 5.5...
it gives me these errors:
Error E2209 bccl.cpp 2: Unable to open include file 'iostream'
Error E2282 bccl.cpp 3: Namespace name expected
Error E2451 bccl.cpp 7: Undefined symbol 'cout' in function main()
Error E2451 bccl.cpp 7: Undefined symbol 'endl' in function main()
*** 4 errors in Compile ***
could anyone tell me whats wrong with my codes...???