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, https://cppreference.com, https://isocpp.org/faq,
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.