Code::blocks 17.12 does not on C++


I installed code::blocks 17.20 from, exactly 17.20 mingw.setup.exe, and it worked perfectly on C. Now, I want to learn C++, and I open a template of C++ with console application where I selected C++, a C++ file with .cpp extension is opened, but very strange for me: it start with "include <iostream>" "using namespace std;" first two lines of code. If I try change <iostream> into <iostream.h> after my manual I get "fatal error iostream.h: No such file or directory".
What can I do? Somebody can help me at my first step on C++? Please!
Last edited on
The current C++ standard uses <iostream>, not <iostream.h>.

Your manual is years out of date, don't use it.

The tutorial here at cplusplus:

LearnCpp is another good online tutorial:
Alas, C::B was correct.

Unfortunately, in many parts of the world people are still being taught (at universities, no less) pre-standard C++ which has been out of date for over 20 years.

We regularly get questions from students in India whose professors have them using Turbo C++ 4, and confusion about why what they are learning doesn’t agree with online resources.

<iostream.h> does not exist in any standard, and it is not compatible with <iostream>. MinGW does not support it.

Unfortunately, your options are limited by what you are required to do:

If you are going to school requiring you to use an obsolete, non-standard C++, then you will need to use the tools the school recommends. Download and install TC++4.0 from the web. I don’t know if C::B can be configured to use such an old compiler. I suspect it can, but C::B’s language support will be very poor for it, and online documentation will not be your friend.

If you are learning this on your own or your school will permit you to turn in assignments using a modern compiler, then you are golden. Bookmark some modern C++ resources on the web, such as the tutorial here,,, and anywhere you can find good tutorials using C++11 or better. (We are currently at revision “C++17”.)
The downside is that classwork will not match modern C++ stuff very easily.

If you have to learn an obsolete version of C++, don’t worry too much about it.
Once you learn how the language works, more or less, it is much easier to bring your thinking and skills up to modern standards by reading online and playing with your own programs.

A lot of people actually do their homeworks using both Turbo C++ and modern C++, and they become very familiar with both versions of the language, which ultimately makes you more marketable.

Hope this helps.
Indeed, on the book is written 2005. Perhaps it is out of date. I'll buy a new one, it's better than working with Turbo C++, Borland etc, I tried them in C and I had a headache.

Thank you very much for replay.
If the book was written in 2005, then it's not just outdated, it's badly outdated. The first C++ standard came out in 1998.

If you're considering buying a new book, then Principles and Practice Using C++, while a little bit dated, is still a good book.

If it is by Malik, then it is bad anyway.

If you have good access to the internet, you really don’t need to buy a book in order to learn C++.
Topic archived. No new replies allowed.