fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define macro 42
  5.  
  6. const int global = macro; // gets replaced by 42
  7.  
  8. #undef macro
  9.  
  10. struct Foo
  11. {
  12. int macro; // now can be used as a regular name
  13. };
  14.  
  15. int main() {
  16. cout<<global<<endl;
  17. }
Success #stdin #stdout 0s 5476KB
stdin
Standard input is empty
stdout
42