#ifdef
These directives allow you to include or exclude code based on certain conditions
Last updated
These directives allow you to include or exclude code based on certain conditions
Last updated
If we include a header file 2 times (maybe in multiple files), we will get error saying multiple declaration found.
To overcome this, we need to ignore multiple inclusion, we define a . which we check if ifdef
and ignore inclusion if already incuded.
Here is an example:
Or another example, we check system config, if system is unix
we use cls
and if it us linux
we use clear
and many more.