fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class CAgs {
  5. public:
  6.  
  7. CAgs (int ar, bool isReady) { cout << "first"; }
  8. CAgs (int ar, const char* options[][2] = NULL) { cout << "sec"; }
  9. };
  10.  
  11. int main() {
  12. CAgs obj(10,0);
  13. }
Compilation error #stdin compilation error #stdout 0s 3344KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12:17: error: call of overloaded ‘CAgs(int, int)’ is ambiguous
    CAgs obj(10,0);
                 ^
prog.cpp:12:17: note: candidates are:
prog.cpp:8:5: note: CAgs::CAgs(int, const char* (*)[2])
     CAgs (int ar, const char* options[][2] = NULL) { cout << "sec"; }
     ^
prog.cpp:7:5: note: CAgs::CAgs(int, bool)
     CAgs (int ar, bool isReady) { cout << "first"; }
     ^
stdout
Standard output is empty