ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I understand it's for the potential clashes with the standard C libraries, it was arbitrarily decided upon a while ago. I't part of the 1998 C++ standard
I understand it's for the potential clashes with the standard C libraries, it was arbitrarily decided upon a while ago. I't part of the 1998 C++ standard
There is nothing that prevents those developing in C++ to use .h as the extension for header files. Some developers like to use .hpp, but AFAIK, there is nothing in the C++ standard that mandates that one uses that particular extension. I've worked on many projects where .h has been used.
As for clashes with standard C header files, that's nonsense too. The compiler will attempt to find the header file(s) specified by the programmer by searching its include path(s). Which ever header file that is found first is the one that is used -- and please note, that a header file is NOT a library. It is a file containing the specification of the constants, macros, functions, classes, and/or even templates that are available for one to use within a library (or other source file module). Typically header files do not contain any code; the exception is when defining templates.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.