I have test.h file and example.h file and I want to include each one in the other
I tried the following but didn’t work.
In file test.h:
#ifndef "example.h"
#define "example.h"`
...
#endif
And in file example.h :
#include "test.h"
And later tried :
#ifndef "test.h"
#define "test.h"
...
#endif
But nothing worked.
You need to come up with some unique identifiers for each include guard. For example:
You can’t just use the filenames with #ifndef etc.