fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. template<class T>
  6. class List
  7. {
  8. public:
  9. bool is_equal(const List<T> &other) const
  10. {
  11. return false;
  12. }
  13. };
  14.  
  15. int main()
  16. {
  17. List<string> *list2 = new List<string>();
  18. List<string> *list3 = new List<string>();
  19.  
  20. // ...
  21.  
  22. bool random = list2->is_equal(*list3);
  23. cout << "LOOK MA, NO ERRORS!";
  24.  
  25. delete list2;
  26. delete list3;
  27.  
  28. return 0;
  29. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
LOOK MA, NO ERRORS!