#include
using namespace std;
int main()
{
}
I saw in some posts that’Header files are not part of the C standard and therefore are not portable’ and should be avoided’. But I Think it is useful in game programming.
Is there any way to avoid this error?
Yes: Do not use non-standard header files provided only by GCC, not Microsoft’s compiler.
The C standard requires every compiler Many headers are provided, such as
Treat standard headers (such as
If you want a header that includes all standard headers, then write your own header It’s easy.
I recently saw #include
#include
using namespace std;
int main()
{
}
I saw in some posts that’Header files are not part of the C standard and therefore are not portable’ and should be avoided’. But I Think it is useful in game programming.
Is there any way to avoid this error?
Yes: Do not use non-standard header files provided only by GCC, not Microsoft’s compiler.
The C standard requires each compiler to provide many headers, such as
The standard headers (e.g. < iostream>) as a “public” interface, and compiler-specific content (such as everything in bit/) as a “private” implementation. If you want the program to be portable to other compilers-or even the same compiler In future versions, you should not rely on compiler-specific implementation details.
If you want a header that includes all standard headers, it is easy to write your own header.
< p>