J
jacob navia
Guys,
I have put the following two lines in a header file to prevent it
from getting included multiple times.
#ifndef __MY_HDR.H__
#define __MY_HDR.H__
// Some macros here
#endif
However, when I compile the code, I am getting following warnings,
warning: extra token at end of #ifndef directive
warning ISO C requires whitespace after the macro name
Can anyone help me finding the problem ?
thnaks a lot for any help.
You wrote:
__MY_HDR.H__
The point is NOT an identifier, you can't write points into
an identifier. Then, the compiler sees
__MY_HDR . H__
This is NOT a valid #ifndef directive of course.
Solution
Change
__MY_HDR.H__ to:
__MY_HDR_H__
getting rid of the point.