Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 4
    Are you talking about how when you include a file like #include <iostream>? Those aren't just for the GCC library. In fact, its defined in the 1997 C++ standard, section 17.3.1.2. I would avoid naming files like that. You can, but the reason the C++ standard library did that was probably to avoid naming conflicts. I actually find it really weird when compilers automatically add a '.h' when you include a header, it seems pretty unstandard to me. And I don't ever see anyone name headers without suffix except for the c++ standard library. Commented Feb 14, 2011 at 21:29
  • 1
    Also, I should note, all of the compilers that I have used, except for borland (which I hate so very much), don't automatically add a '.h' or '.hpp' or '.hxx' when you try to include a file with no suffix. Don't expect #include <someclass> to be read as #include <someclass.hpp> on all compilers. Your code will break. Commented Feb 14, 2011 at 21:49