C Preprocessor

10. C Preprocessor

10.2I've gotsome cute preprocessor macrosthat let mewrite C code that looks more like Pascal.What do y'all think?

10.3How can I write a generic macro to swap two values?

10.4What's the best way to write a multi-statement macro?

10.6What are .h files and what should I put in them?

10.7Is it acceptable for one header file to #include another?

10.8Where are header(``#include'') files searched for?

10.9I'm getting strangesyntax errorson the very firstdeclaration ina file,but it looks fine.

10.11Where can I geta copyof a missing header file?

10.12How can I construct preprocessor #if expressions which compare strings?

10.13Does the sizeof operator work in preprocessor #if directives?

10.14Can I use an #ifdef in a #define line, to define something two different ways?

10.15Is there anything likean #ifdef for typedefs?

10.16How can I use a preprocessor #if expression to detect endianness?

10.18How can I preprocesssomecodetoremove selected conditional compilations,without preprocessing everything?

10.19How can I list all of the pre#defined identifiers?

10.20I have some old code that tries to construct identifiers with amacro like"#define Paste(a, b) a/**/b", but it doesn't work any more.

10.22

What does the message ``warning: macro replacement within a string literal'' mean?

10.23How can Iusea macro argumentinsidea stringliteralin the macro expansion?

10.25I've got this tricky preprocessing I want to doandI can't figure out a wayto do it.

10.26How can I write a macro which takes a variable number ofarguments?


top