Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 4 years ago

Language

C++

Compiler

gcc 7.3.0

Options
Warnings
Boost 1.73.0
C++17(GNU)
no pedantic

Author

anonymous

almost 4 years ago

testFile.h
noname-3

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-7.3.0/include -std=gnu++17
prog.cc: In function 'int main()':
prog.cc:33:29: error: call of overloaded 'Person(const char [4])' is ambiguous
     Person p2 = Person("hhh");
                             ^
prog.cc:13:5: note: candidate: Person::Person(std::__cxx11::string, double)
     Person(string n = "", double a = 0.0) {
     ^~~~~~
prog.cc:11:5: note: candidate: Person::Person(std::__cxx11::string)
     Person(string  _name):name(_name) {}
     ^~~~~~
Exit Code:
1