Is anything written after iostream allowed in c++

144 Views Asked by At

In C++ program instead of iostream.h if I write iostreamhihiju.h it still works. It does not give an error. Like this:

enter image description here

Anything written after iostream is allowed, can someone help to find the the reason?

1

There are 1 best solutions below

2
On

You appear to be using an ancient DOS-based compiler. In DOS, file names can have at most 8 characters before the extension, anything more is silently dropped. iostream.h, iostreamx.h and iostreamhihiju.h all name the same file.

This will stop working when you move to a Windows-based compiler.