-2

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?

4

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.