I have a selection of #defines in a header that are user editable and so I subsequently wish to check that the defines exist in case a user deletes them altogether, e.g.
#if defined MANUF && defined SERIAL && defined MODEL
// All defined OK so do nothing
#else
#error "User is stoopid!"
#endif
This works perfectly OK, I am wondering however if there is a better way to check if multiple defines are NOT in place... i.e. something like:
#ifn defined MANUF || defined SERIAL ||.... // note the n in #ifn
or maybe
#if !defined MANUF || !defined SERIAL ||....
to remove the need for the empty #if section.
#if !defined(MANUF) || !defined(SERIAL) || !defined(MODEL)