I messed with C++ my first year in programming, and now as an AP student its all Java focused. As I want to be a game programmer I decided to get back to learning C++ because I've heard its often used.

So, I downloaded Bloodshed Dev-C++, which was reccomended by a guy I know.

Well, I pulled up a website tutorial, typed up the most basic "Hello World" application to reaquaint from square one, and upon compiling it...

It calls <iostream.h> an antiquated header. It says to reference some standard 32 headers or whatnot somewhere...I'm not too knowlageable in the world wide use of C++, or any language, as I've only had local useage, but when the heck does someone just decide to up and change a standard language?

In closing though, whats wrong with the program? I've the code below...

//include this file for cout
#include <iostream.h>

int main()
{

//print out the text string, "Hello, World!"
cout << "Hello, World!" << endl;

return 0;

}

chnage your code to

#include <iostream>
using namespace std;

int main()
{

//print out the text string, "Hello, World!"
cout << "Hello, World!" << endl;

return 0;

}

Might I have an explination as to whats up with the change, and a point to an online tutorial thats up to date?

Also, it compiles now but it does not bring up a console, it flashes it and closes it.

Might I have an explination as to whats up with the change, and a point to an online tutorial thats up to date?

The reason for the change is a little long-winded and boring, but it has to do with the fact that up until 1999, C++ was not standardised. When the standardisation came along, the ISO Committee decided that requiring vendors to modify their own versions of iostream.h could potentially break so much legacy code, that the best solution was to allow the vendors to keep their deprecated iostream.h, and add the new, standard one in the form of <iostream>. The same is true for all standard library headers (eg, <string>, <vector>, etc). There is also talk that one day, the older headers ending in ".h" may be completely removed from C++


As for tutorials, be aware that many are of varying quality, and sometimes mix old and new code. Nevertheless, there's alot of information around. My favourite starting point for any subject is Wikipedia, so have a look here: http://en.wikipedia.org/wiki/C_Plus_Plus
The links section in the wiki entry (right at the bottom) has a bunch of tutorials and other useful C++ stuff - plenty to keep you in reading material.

If you can afford it, buy a good quality beginners' C++ book. The ACCU (Association of C and C++ Users) has a reliable book reviews section. ( http://www.accu.org )

If you can't afford a book at the moment, check out Bruce Eckel's free ebook on his site http://mindview.net/Books/TICPP/ThinkingInCPP2e.html

>There is also talk that one day, the older headers ending in ".h" may be completely removed from C++
You're confusing the C library headers, which *are* deprecated, with the non-standard C++ headers. The difference is that iostream.h and friends aren't required to be supported by an implementation in any way, while the C headers must be supported now, but could be removed in a future revision.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.