Top "Stdstring" questions

std::string is the C++ standard library's byte-based "string" type, defined in the <string> header.

C++ Error: No Match for Call

I'm trying to compile the following code in C++ string initialDecision () { char decisionReviewUpdate; cout << "Welcome. Type R to …

c++ stdstring no-match
How do I construct a std::string from a DWORD?

I have following code: Tools::Logger.Log(string(GetLastError()), Error); GetLastError() returns a DWORD a numeric value, but the constructor …

c++ numeric stdstring
How can I format a std::string using a collection of arguments?

Is it possible to format std::string passing a set of arguments? Currently I am formatting the string this way: …

c++ string-formatting stdstring variadic-functions
Way to get unsigned char into a std::string without reinterpret_cast?

I have an unsigned char array that I need in a std::string, but my current way uses reinterpret_cast …

c++ stdstring reinterpret-cast
Return std::string as const reference

I have a doubt on returning std::string as const reference. class sample { public: std::string mString; void Set(const …

c++ string reference constants stdstring
Storing unicode UTF-8 string in std::string

In response to discussion in Cross-platform strings (and Unicode) in C++ How to deal with Unicode strings in C/C++ …

c++ windows unicode utf-8 stdstring
How to Fix Visual Studio 2012 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string?

How to fix a Visual Studio 2012 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string? I've been …

visual-studio-2012 unresolved-external lnk2019 c++-standard-library stdstring
Legality of COW std::string implementation in C++11

It had been my understanding that copy-on-write is not a viable way to implement a conforming std::string in C++11, …

c++ string c++11 stdstring copy-on-write
How to replace all occurrences of one character with two characters using std::string?

Is there a nice simple way to replace all occurrences of "/" in a std::string with "\/" to escape all the …

c++ replace escaping stdstring
Generating a SHA256 hash with Crypto++, using a string as input and output?

I need an example of how to use Crypto++ to generate a SHA256 hash from a std::string and output …

c++ hash stdstring sha256 crypto++