fork(2) download
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. ////////////////////////////////////////
  6.  
  7. #define _UNDERSCORE(a,b) a ## _ ## b
  8. #define UNDERSCORE(a,b) _UNDERSCORE(a,b)
  9.  
  10. #define _STRINGIFY(x) #x
  11. #define STRINGIFY(x) _STRINGIFY(x)
  12.  
  13. #define VALUE(x) UNDERSCORE(x, VALUE)
  14. #define NEXT(x) (VALUE(x) + 1)
  15.  
  16. /////////////////////////////////////////
  17.  
  18. #define X1_VALUE 0
  19. #define X2_VALUE NEXT(X1)
  20. #define X3_VALUE NEXT(X2)
  21. #define TOTAL NEXT(X3)
  22.  
  23. int main() {
  24. cout << STRINGIFY(TOTAL) << endl;
  25. //cout << TOTAL << endl;
  26. return 0;
  27. }
  28.  
  29.  
  30.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
(NEXT(X2) + 1)