fork(1) download
  1. #include <string>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. class foo
  6. {
  7. public:
  8. foo(long long) {}
  9. foo(const string &) {}
  10. operator long long()const { return 666; }
  11. explicit operator string()const { return "666"; }
  12. };
  13.  
  14. int main()
  15. {
  16. string s("abc");
  17. long long v=13;
  18.  
  19. foo fa(s),fb=s,fc(v),fd=v;
  20. s=fc; // O TU MASZ TEN TWOJ PRZYPADEK
  21. v=fa;
  22. return 0;
  23. }
Success #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty