• (2 Pages)
  • +
  • 1
  • 2

C-Style and C++ Style Strings Rate Topic: -----

#16 JackOfAllTrades  Icon User is online

  • Saucy!
  • member icon

Reputation: 5951
  • View blog
  • Posts: 23,213
  • Joined: 23-August 08

Posted 12 June 2011 - 06:48 AM

It's not Microsoft-specific at all. C++ Reference.

Quote

Also, several specializations of the class basic_string are provided:

typedef basic_string<char> string;
typedef basic_string<wchar_t> wstring;
typedef basic_string<char16_t> u16string; //C++0x feature
typedef basic_string<char32_t> u32string; //C++0x feature

Was This Post Helpful? 2
  • +
  • -

#17 PlasticineGuy  Icon User is offline

  • mov dword[esp+eax],0
  • member icon

Reputation: 281
  • View blog
  • Posts: 1,436
  • Joined: 03-January 10

Posted 16 June 2011 - 07:36 AM

Typically speaking, C-style char*s are only used to mean strings when using C libraries such as Windows or OpenGL. char*s themselves have other uses; for example, as an array of bytes (a single character can hold a single byte) for memory operations. However, of course then you are better off using std::vector <char> anyway.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2