Can anyone help me understand #pragma?
ifndef TARGET_OS_LINUX
#pragma once
endif
What,when, where, why, an example?
The above is in some code that I am refactoring....
See Question&Answers more detail:osCan anyone help me understand #pragma?
ifndef TARGET_OS_LINUX
#pragma once
endif
What,when, where, why, an example?
The above is in some code that I am refactoring....
See Question&Answers more detail:os#pragma
is just the prefix for a compiler-specific feature.
In this case, #pragma once
means that this header file will only ever be included once in a specific destination file. It removes the need for include guards.