#ifdef in c for filename for guarding static function in header file -


I have a condition in which I have a header file and it must be included in more than one file in it some fixed functions The prototype is something I want to do

  #ifdef filename.c static foo (zero); Static bar; #endif   

This means that if I include it in the filename by the file name, these function prototypes are active and if they are included in another file they are cool

filename.c is a relative unusual symbol. In addition, you must explicitly define a mark in your filename-file. Like:

  #ifdef FILENAME_C_ static foo (zero); Static bar; #endif   

and your filename.c -file

  #define FILENAME_C_   

You should like the underscore _ -version in FILENAME_C _ , it is more general and easy to read, however, I do not understand that you can only do those tasks Why would you declare it? You have to define them in filename.c-file anyway. What do you want to achieve with this?

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -