1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
$ make
/usr/bin/g++ -Wall -Wextra -g test.cpp -o test
test.cpp: In member function ‘bool UserInputHandler::GetBoolean()’:
test.cpp:26:18: error: could not convert ‘str.std::basic_string<_CharT, _Traits, _Alloc>::operator=<char, std::char_traits<char>, std::allocator<char> >(((const char*)"T"))’ from ‘std::basic_string<char>’ to ‘bool’
if (str = "T") {
^
test.cpp:28:26: error: could not convert ‘str.std::basic_string<_CharT, _Traits, _Alloc>::operator=<char, std::char_traits<char>, std::allocator<char> >(((const char*)"F"))’ from ‘std::basic_string<char>’ to ‘bool’
} else if ( str = "F") {
^
test.cpp:30:28: error: could not convert ‘str.std::basic_string<_CharT, _Traits, _Alloc>::operator=<char, std::char_traits<char>, std::allocator<char> >(((const char*)"true"))’ from ‘std::basic_string<char>’ to ‘bool’
} else if (str = "true") {
^
test.cpp:32:29: error: could not convert ‘str.std::basic_string<_CharT, _Traits, _Alloc>::operator=<char, std::char_traits<char>, std::allocator<char> >(((const char*)"false"))’ from ‘std::basic_string<char>’ to ‘bool’
} else if (str = "false") {
^
makefile:10: recipe for target 'test' failed
make: *** [test] Error 1
|