fork(2) download
  1. include <iostream>
  2. using namespace std;
  3.  
  4. #define SYS_NUM(num) qwer##num
  5.  
  6.  
  7.  
  8. void main ()
  9. {
  10.  
  11. char num[10]="ty";
  12. num1 = SYS_NUM (ty);
  13. cout<<num;
  14. }
  15. return 0;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
 include <iostream>
         ^
prog.c:8:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main ()
      ^
prog.c: In function ‘main’:
prog.c:12:2: error: ‘num1’ undeclared (first use in this function)
  num1 = SYS_NUM (ty);
  ^
prog.c:12:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:4:22: error: ‘qwerty’ undeclared (first use in this function)
 #define SYS_NUM(num) qwer##num   
                      ^
prog.c:12:9: note: in expansion of macro ‘SYS_NUM’
  num1 = SYS_NUM (ty);
         ^
prog.c:13:2: error: ‘cout’ undeclared (first use in this function)
  cout<<num;
  ^
prog.c: At top level:
prog.c:15:2: error: expected identifier or ‘(’ before ‘return’
  return 0;
  ^
prog.c:16:1: error: expected identifier or ‘(’ before ‘}’ token
 }
 ^
stdout
Standard output is empty