I am a student who is learning C++. I have gone through tutorials in the Internet. All of them do not use a .h extension after some include files, such as
#include <iostream>
But my C++ lecturer says that I have to include a .h extension after iostream, such as:
#include <iostream.h>
My book "The Waite Group's Object Oriented Programming In Turbo C++" written by Robert Lafore also tells me to put a .h extension after iostream. Both my lecturer and the book says there is no need to have the following line of code when using the cout and cin functions.
using namespace std;
When using cout and cin functions, the namespace std is needed, right? If I try to do what the book and lecturer tells, my compiler(g++) gives me errors. The book also says to use
void main()
rather than
int main()
If I follow what the lecturer or the book says, I get errors during compiling. What is happening? I am using g++ on Linux Mint 17 for compiling.
<iostream.h>
header file is from before C++ was standardized in 1998. – Some programmer dude