About 8,030,000 results
Open links in new tab
  1. How to convert std:string to CString in unicode project

    Oct 27, 2013 · Answering a question on converting from std::string to CString in Unicode projects without mentioning code pages and encodings is incomplete at best. What is the encoding …

  2. How to: Convert Between Various String Types | Microsoft Learn

    Oct 3, 2022 · This article shows how to convert various Visual C++ string types into other strings. The strings types that are covered include char *, wchar_t*, _bstr_t, CComBSTR, CString, …

  3. How to Convert a C++ String to a C-Style char*: Using ...

    Nov 26, 2025 · In C++, `std::string` is the go-to choice for string manipulation, offering safety, dynamic memory management, and a rich set of member functions. However, there are …

  4. How to convert C style strings to std::string and vice versa?

    Jul 6, 2017 · Output: This is a C-String : Testing This is a std::string : Testing The above conversion also works for character array. // Character array to std::string conversion char a[] …

  5. Converting String to Cstring in C++ - Stack Overflow

    Aug 6, 2012 · Converting String to Cstring in C++ Asked 13 years, 5 months ago Modified 2 years, 3 months ago Viewed 168k times

  6. string - C++ Users

    Get C string equivalent Returns a pointer to an array that contains a null-terminated sequence of characters (i.e., a C-string) representing the current value of the string object. This array …

  7. cpp-docs/docs/text/how-to-convert-between-various-string ...

    Sep 29, 2022 · This example demonstrates how to convert from a wchar_t * to other string types. Several string types, including wchar_t *, implement wide character formats. To convert a …

  8. 22.4 — std::string character access and conversion to C-style ...

    Sep 16, 2022 · Conversion to C-style arrays Many functions (including all C functions) expect strings to be formatted as C-style strings rather than std::string. For this reason, std::string …