These compiler control directives are used in different situations. They are: Situation 1 You have included a file containing some macro definitions. It is not known whether a certain macro has been defined in that header file. However, you want to be certain that the macro is defined. This situation refers to the conditional definition of a macro. We want to ensure that the macro TEST is always defined, irrespective of whether it has been defined in the header file or not. This can be achieved as follows: 1 2 3 4 #include”DEFINE.H” #ifndef TEST #define TEST 1 #endif
The post what are the control directives of the compiler appeared first on Coding Security.
what are the control directives of the compiler
read more
Tidak ada komentar:
Posting Komentar