fork download
  1. #include <stdlib.h>
  2. #include <string.h>
  3.  
  4. typedef unsigned char uint8;
  5. class A {};
  6.  
  7. const char* operator+(const A& bar, const uint8* foo)
  8. {
  9. return (const char *)foo;
  10. }
  11.  
  12. const uint8* operator+(const A& bar, const char* foo)
  13. {
  14. return (const uint8 *)foo;
  15. }
  16.  
  17. A cstr;
  18.  
  19. int main()
  20. {
  21. const uint8* str = cstr + "Testing 1 2 3";
  22. int len = strlen(cstr+str);
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty