0

I am working on a project that is written is VScode and is working properly. But when I am trying to execute the same on gn(generate ninja), this the error I am getting:-

error: no member named 'GetLength' in 'std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>'
    int sz = string.GetLength();

I am not sure what is wrong here. Any little hint will be highly appreciated.

Vaibhav Angi
  • 57
  • 1
  • 4
  • 1
    `std::string` has `length()` and `size()` member functions that do the same thing. No `GetLength()` though. https://en.cppreference.com/w/cpp/string/basic_string/size – Retired Ninja Jun 04 '21 at 05:36
  • 1
    You're using `std::wstring` for the string, but the MFC/ATL `CString` member function `GetLength()`. – Some programmer dude Jun 04 '21 at 05:38

0 Answers0