Advertisement
Guest User

Untitled

a guest
Nov 4th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. void print(const char* c);
  2. #ifdef XYZZY
  3. void print(const char* c) { std::cout << c; };
  4. #endif
  5. #include <iostream>
  6. #define XYZZY
  7.  
  8. struct X
  9. {
  10.     X(const char* c) {}
  11. };
  12.  
  13. void print(X)
  14. {
  15.     std::cout << "void print(const char* c);\n"
  16.               << "#ifdef XYZZY\n"
  17.               << "void print(const char* c) { std::cout << c; };\n"
  18.               << "#endif\n";
  19. }
  20.  
  21. int main()
  22. {
  23.     print("71E17-65E47-AD4D2-984F8\n");
  24. }
  25. void print(const char* c);
  26. #ifdef XYZZY
  27. void print(const char* c) { std::cout << c; };
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement