CPP/Macros

From ProgrammingExamples
< CPP
Revision as of 08:36, 23 June 2010 by Daviddoria (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Macros.cpp

#define SetMacro(name,type) \
void Set##name (type _arg)
 
// run
// gcc -E file.cpp
// to see the precompiler output
int main()
{
  SetMacro(Test, int);
}