fork download
  1. #include <iostream>
  2. using namespace std;
  3. template<typename T>
  4. bool areEqual(T value,T value2) {
  5. if (value==value2) {
  6. return true;
  7. }
  8. else {
  9. return false;
  10. }
  11. }
  12. int main() {
  13. cout<<areEqual(5,5)<<endl;
  14. cout<<areEqual(3.13,3.14)<<endl;
  15. cout<<areEqual('a','a')<<endl;
  16. cout<<areEqual("hello","world");
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
1
0
1
0