iostream and iostream.h

I Use turbo c++ 3.0 and in my compiler... to print "hello world!" I should type this:
#include <iostream.h>
int main()
{
cout<<"Hello World!";
return 0;
}

but here (in this site) we should use #include <iostream>
how to solve the problem?
You could use a newer compiler.
closed account (z05DSL3A)
Turbo c++ 3.0 is very old (pre-Standard).

If you want to write standard compliant code you will need a newer compiler.
Turbo c++ is used when the basic programming is being taught or learned as it strictly follows the older and more precise rules of c++.

the new version of c++ like visual C++ 2010 uses a brand new compiler and has some changed rules. For example the " .h ". it was used earlier to show that it's a header file(h) but as of now ,in the newer version it has been removed as an advancement in understanding that <iostream> is a header file!

Normally in turbo 3.0 you write "cin" and "cout" as it is with the designated braces but you would see that in visual c++ 2010, it'll be written as " std::cin " or "std::cout" with designated braces. many other changes are there.

I would suggest that u learn the programming in turbo 3.0 or visual basic 6.0* or any other advanced/latest version of c++ as it'll confuse you and after you are thorough very properly with c++ then go with newer versions.


* - visual basic 6.0 (I use it) is a good choice if u dont have turbo 3.0 its the best as it does everything the same as turbo but lacks in some places like the use of clrscr() command. clrscr() cant be used in visual basic 6.0 but can be done in the newer version.
Again how in VB 6.0 ? when u open a new project go for the classic method! File --> New.

Choose the "Files" button in the sub-menu and then "C++ SOURCE FILE".



hope i have helped! :)
Turbo is an OOOOOOOLD compiler,so as said it follows the old Core C structure,but the newer(or say modern) compilers "understands" much better.
I suggest you pick up the Bloodshed's Dev C++,its the very BEST software I've used,its basic and has newer features,use either DevC++ 4.9.9 or DevC++ 5.0.0(Newest version),you'll surely love it.
Turbo c++ is used when the basic programming is being taught

That's terrible. I understand it being used when history of computing is being taught, but programming?
tnx dev c++ is my fav!!!
but i face lots of errors in visual c++...its like visual c++ is a different type of language...
Topic archived. No new replies allowed.