Consider the code.
#ifndef FOO_H
#define FOO_H
//Code
#endif
Code can be following cases
// Case 1:
#define foo 0
// Case 2:
void foo_method(){};
// Case 3:
int foo;
foo.h
is included in many C files. When I compile only the case 1 is without errors, other cases throw errors of duplication.
Why is so when the foo.h
is not concatenated to C files except the one while compiling?