0
when to use iostream and iostream.h? similarly when to use int main and void main? what is difference between these?
3 Antworten
+ 1
You should almost never use "void main". The fact that it works at all is compiler specific and could cause problems when you run your program on a different system.
iostream.h is the actual filename of the header file iostream. If you want your program to use the iostream library, you have to put #include <iostream.h>. If you put #include <iostream> without the .h, the compiler will not know what file is being referenced.
0
Thanks Ryne.
But on this site, <iostream> has been used everywhere. Why not <iostream.h> ?
0
Sorry. <iostream> is ok for c++ and <iostream.h> is c.
I always forget that the course is c++ on this site.