Search code examples
c++turbo-c++

Why do we use <iostream.h> in Turbo C++?


I have some doubt as to why we use ".h" after iostream and do not include using namespace std; because with any other compiler we don't use ".h" after iostream and we add always use using namespace std;. Why?


Solution

  • why do we use <iostream.h> in turbo c++ IDE

    Because turbo c++ IDE uses the turbo c++ compiler, which was written before c++ was standardised. In that ancient dialect of the language, the STL header is named differently from the standard library header that we have in the standard.

    That said, very few people use turbo c++ in the real world.

    and add always use using namespace std;

    No. We never use using namespace std;. And you should neither.

    But specifically in turbo C++ dialect, the language didn't have namespaces yet.