Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do I have to include “libcwd/sys.h” as first header file?

file header
0
Posted

Why do I have to include “libcwd/sys.h” as first header file?

0

This header file is used to fix operating systems bugs, including bugs in the system header files. The only way it can do this is when it is included before any other header file, including system header files. Any project should have one header file that is included at the top of every source file. If you already have one then you can add #include to that file. Otherwise you should add such a header file: its a Good Thing(tm) to have. Because this must be included in every source file as very first header file, it would make no sense to include it also in another header file; so it isn’t. As a result, forgetting this header file or including any other libcwd header file before including libcwd/sys.h, will definitely lead to compile errors in that header file.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123