fork(1) download
  1.  
  2. class String
  3. {
  4. public:
  5. String() {}
  6.  
  7. //[...]
  8.  
  9. //These methods concatenate a String with a number
  10. String& operator+=(const int rhs) { return *this; }
  11. String& operator+(const int rhs) { return (*this); }
  12.  
  13.  
  14. String& operator+=(const float rhs) { return *this; }
  15. String& operator+(const float rhs) { return *this; }
  16.  
  17. //[...]
  18. };
  19.  
  20.  
  21. int main()
  22. {
  23. String s;
  24. int i = 5;
  25. String s2 = s + i;
  26. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty