Conditional include a file in C -


i have question. supose 2 teams makes modification on source file include header "test.c" 1 had file called "test.c" , 1 had called "test.c" there way conditional include file in c? like:

#ifdef test.c     #include "test.c" #else     #include "test.c" #endif 

as dave correctly stated, the c preprocessor has no method check if files exist. provided suitable shell , compiler allows define macro on command line, can like

set test.?; cc source.c -dtest=\"$1\" 

and in source file have

#include test 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -