Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #define TRACE_FUNC( symbol ) replacement-text`
  2.  
  3. #define TRACE_FUNC(sym) std::cout << #sym << "() calledn"
  4.  
  5. void foo()
  6. {
  7. TRACE_FUNC(foo);
  8. ...
  9. }
  10.  
  11. #define TRACE_FUNC(sym) printf("%s() called", #sym);
  12.  
  13. TRACE_FUNC(printf)
  14.  
  15. printf() called
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement