Hello. Help correct the error. How not to change the code, it was not possible to fix it.

1>------ Build started: Project: lab3, Configuration: Debug Win32 ------ 1>Source.cpp 1>e:\програмування\lab3\lab3project\lab3\lab3\phonebook.h(100): error C3867: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::length': non-standard syntax; use '&' to create a pointer to member 1>e:\програмування\lab3\lab3project\lab3\lab3\phonebook.h(100): error C2446: '!=': no conversion from 'int' to 'unsigned int (__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::* )(void) noexcept const' 1>e:\програмування\lab3\lab3project\lab3\lab3\phonebook.h(100): note: There are no conversions from integral values to pointer-to-member values 1>e:\програмування\lab3\lab3project\lab3\lab3\phonebook.h(104): error C3867: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::length': non-standard syntax; use '&' to create a pointer to member 1>e:\програмування\lab3\lab3project\lab3\lab3\phonebook.h(104): error C2446: '<': no conversion from 'unsigned int (__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::* )(void) noexcept const' to 'int' 1>e:\програмування\lab3\lab3project\lab3\lab3\phonebook.h(104): note: There is no context in which this conversion is possible 1>Done building project "lab3.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

Here is the code:

https://gist.github.com/AndreyRafalsky/e84d389470e657a4e01e94e518b4ac68

Thanks in advance for your help.

  • one
    number.length() != 12 // Скобочки - ffk
  • one
    nember.length () is a member function, not data ... - Fat-Zer
  • Eh, I got stuck on such trifles ... Thank you all so much for your help - Jack132

0