Top "Stdstring" questions

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

Does "&s[0]" point to contiguous characters in a std::string?

I'm doing some maintenance work and ran across something like the following: std::string s; s.resize( strLength ); // strLength is …

c++ memcpy stdstring c++03
Error LNK2019: unresolved external symbol "toString(int)"

Environment: Windows XP. Visual Studios 2010. Language - C++. I have run into the following link error & have run out …

visual-studio-2010 unresolved-external c++-standard-library lnk2019 stdstring
what is use of C_str() function in C/C++

Can anybody tell me what is the use of c_str() function in C/C++?. In which case it is …

c++ stdstring c-str
Is std::string ref-counted in GCC 4.x / C++11?

Is std::string reference-counted when using gcc 4 with -std=c++0x or -std=c++11?

c++ gcc c++11 stdstring
how to put std::string into boost::lockfree::queue (or alternative)?

I'm trying to put std::strings into boost::lockfree::queues so that my threads can update each other with new …

c++ boost queue stdstring lock-free
Convert from CFURLRef or CFStringRef to std::string

How can I convert a CFURLRef to a C++ std::string? I also can convert from the CFURLRef to a …

c++ macos stdstring cfstring cfurl-encoding
std::string::assign vs std::string::operator=

I coded in Borland C++ ages ago, and now I'm trying to understand the "new"(to me) C+11 (I know, …

c++11 stdstring
How to efficiently get a `string_view` for a substring of `std::string`

Using http://en.cppreference.com/w/cpp/string/basic_string_view as a reference, I see no way to do …

c++ view c++17 stdstring
std::string::c_str() and temporaries

Is the following C++ code well-formed: void consumer(char const* p) { std::printf("%s", p); } std::string random_string_generator() { // …

c++ stl stdstring
Default capacity of std::string?

When I create a std::string using the default constructor, is ANY memory allocated on the heap? I'm hoping the …

c++ string std dynamic-memory-allocation stdstring