0

LPSTR a = LPSTR("hello"); how to convert a to LPCWSTR? string in C++ are confusing me, why methods use LPCWSTR and not just LPSTR D: I hope someone can provide a link where I can learn C++ strings

1 Answers1

1

LPSTR and LPCWSTR are Windows specific types. They are not c++ strings, but char pointers alias which are C.

The STL - Standard Template Library - which is shipped with C++ provides a std::string class, which is a convinient alias for basic_string<char, std::char_traits<char>, std::allocator<char>>. See the documentation here.

Guss
  • 622
  • 4
  • 14
Emanuel P
  • 800
  • 3
  • 12