D
Dave
Hello all,
To protect against multiple inclusions, it is standard practice to enclose
the contents of a header file in a construct like this:
#ifndef FOO_INCLUDED
#define FOO_INCLUDED
....
#endif
I need to automate the creation of the guard macro name, perhaps by doing
something like this:
#define MACRO_NAME_CREATOR(TEXT) TEXT##_INCLUDED
#ifndef MACRO_NAME_CREATOR(__FILE__)
#define MACRO_NAME_CREATOR(__FILE__)
....
#endif
However, this does not work. Can anybody offer a technique that will
accomplish what is intended above?
Thanks,
Dave
To protect against multiple inclusions, it is standard practice to enclose
the contents of a header file in a construct like this:
#ifndef FOO_INCLUDED
#define FOO_INCLUDED
....
#endif
I need to automate the creation of the guard macro name, perhaps by doing
something like this:
#define MACRO_NAME_CREATOR(TEXT) TEXT##_INCLUDED
#ifndef MACRO_NAME_CREATOR(__FILE__)
#define MACRO_NAME_CREATOR(__FILE__)
....
#endif
However, this does not work. Can anybody offer a technique that will
accomplish what is intended above?
Thanks,
Dave