hello world dev c++

Aug 31, 2011 at 8:01pm
Ho here I am again just trying to understand a bit of this software jargon can any one tell me why I cant compile this in dev c++ …….. spent about 2 hours reading help file ...i am brand new to this
Aug 31, 2011 at 8:04pm
What happens when you push the button to compile?
Aug 31, 2011 at 8:05pm
stuf comes in the bottom window
Aug 31, 2011 at 8:08pm
#warning This file includes at least one deprecated or antiquated header. \
Please consider using one of the 32 headers found in section 17.4.1.2 of the \
C++ standard. Examples include substituting the <X> header for the <X.h> ........
...................................................................................................................................
is one of them
Aug 31, 2011 at 8:09pm
1 C:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from C:\Dev-Cpp\Untitled1.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from C:\Dev-Cpp\Untitled1.cpp
Aug 31, 2011 at 8:09pm
Sounds like your code is not conformant with C++ (i.e. you're not writing C++ code).

One problem is using Dev-C++.
http://www.cplusplus.com/articles/36vU7k9E/
Aug 31, 2011 at 8:13pm
#include <iostream.h>

int main()
{
cout << "Hello World!\n";
return 0;
}
Aug 31, 2011 at 8:16pm
That's not conformant with the C++ standard. There is no such header file as iostream.h in C++

Try this instead:

1
2
3
4
5
6
7
#include <iostream>

int main()
{
std::cout << "Hello World!\n";
return 0;
}

Aug 31, 2011 at 8:18pm
wow it worked ????????????????
Aug 31, 2011 at 8:19pm
whats the std or will i learn about this later
Aug 31, 2011 at 8:20pm
You should have learned about it already. Whatever you're using to learn C++ from, stop. It's not teaching you C++.

Start here: http://www.cplusplus.com/doc/tutorial/
Last edited on Aug 31, 2011 at 8:21pm
Aug 31, 2011 at 8:22pm
learn in 21 days
Topic archived. No new replies allowed.