Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. /**** consts.h ******/
  2. #ifndef CONSTS_H
  3. #define CONSTS_H
  4. namespace Consts {
  5. const int TEST = 1;
  6. }
  7. #endif
  8.  
  9. /***** test1.cpp ******/
  10. #include "consts.h"
  11. int foo1() { return Consts::TEST+1 }
  12.  
  13. /***** test2.cpp ******/
  14. #include "consts.h"
  15. int foo2() { return Consts::TEST+2 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement