fork download
  1. #include <iostream>
  2. #include <string.h>
  3. #include <vector>
  4.  
  5. #define sm(pa) #pa
  6.  
  7. #define cmp_(param) strcmp(#param, s.data()) == 0
  8.  
  9. int main()
  10. {
  11. std::vector<char> s = {'a', 'b', 'c', 'd'};
  12. std::cout << sm(opoa) << std::endl;
  13. std::cout << (strcmp("abcd", s.data()) == 0) << std::endl;
  14. std::cout << (cmp_(abcd)) << std::endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
opoa
1
1