You need to add the following:
#include <string>
Related Posts:
- Split a string using C++11
- printf with std::string?
- error C2679: binary ‘<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
- convert string to size_t
- Why the switch statement cannot be applied on strings?
- How to convert string to char array in C++?
- How can I convert a std::string to int?
- Easiest way to convert int to string in C++
- Why is “using namespace std;” considered bad practice?
- What is a lambda expression in C++11?
- std::string to char*
- How to convert string to char array in C++?
- C++ — expected primary-expression before ‘ ‘
- ld: symbol(s) not found for architecture x86_64 error
- C++ string to double conversion
- Conversion from string to char – c++
- What is `CString`?
- What is the ‘override’ keyword in C++ used for? [duplicate]
- What is a smart pointer and when should I use one?
- Meaning of = delete after function declaration
- C++ std::priority_queue uses the lambda expression
- Usage and Syntax of std::function
- How do I include the string header?
- What exactly is nullptr?
- Differences between C++ string == and compare()?
- How to convert a char array to a string?
- Difference between `constexpr` and `const`
- How to use _CRT_SECURE_NO_WARNINGS
- How do I convert a double into a string in C++?
- How to create timer events using C++ 11?
- How do I iterate over the words of a string?
- How to convert an instance of std::string to lower case
- Check if a string contains a string in C++
- How do I iterate over the words of a string?
- Returning an empty string : efficient way in c++
- Replace part of a string with another string
- C++ string to double conversion
- What is use of c_str function In c++
- How to reverse an std::string? [duplicate]
- What does T&& (double ampersand) mean in C++11?
- C++ Parsing input string to variables
- Segmentation fault error 11 C++
- Why doesn’t C++ have a garbage collector?
- Compiling C++11 with g++
- terminate called after throwing an instance of ‘std::invalid_argument’ what(): stoi
- std::string to char*
- What exactly is std::atomic?
- SDL2.DLL missing
- Issue with std::stol – ‘std::invalid_argument’ what(): stol
- terminate called after throwing an instance of ‘std::out_of_range’
- How to convert a std::string to const char* or char*
- Cleanest way to copy a constant size array in c++11
- How do I tokenize a string in C++?
- Why use string::iterator rather than index?
- push_back vs emplace_back
- Why am I getting string does not name a type Error?
- undefined reference to ‘std::cout’
- What is move semantics?
- expression preceding parentheses of apparent call must have (pointer-to-) function type
- C++ error: Undefined symbols for architecture x86_64
- C++ deprecated conversion from string constant to ‘char*’
- C++ terminate called without an active exception
- identifier “string” undefined?
- The #include
exists, but I get an error: identifier “cout” is undefined. Why? - Thread pooling in C++11
- Press Enter to Continue
- Converting a vector
to string - Parsing a comma-delimited std::string
- How can I convert const char* to string and then back to char*?
- std::string formatting like sprintf
- How does std::forward work? [duplicate]
- Sorting Characters Of A C++ String
- basic_string::_M_construct null not valid after constructing subvector of strings
- How to copy a string of std::string type in C++?
- How to return a string from a C++ function?
- std::out_of_range error?
- What is the difference between isdigit() and isnumber()?
- Identifier is undefined
- Convert char* to string C++
- Difference in make_shared and normal shared_ptr in C++
- Convert a String In C++ To Upper Case
- What is std::move(), and when should it be used?
- Right way to split an std::string into a vector
- Read whole ASCII file into C++ std::string
- Right way to split an std::string into a vector
- string subscript out of range error
- C++ String Variable Declaration
- push_back vs emplace_back
- Returning an empty string : efficient way in c++
- Split a string into an array in C++
- splitting a string into an array in C++ without using vector
- Remove spaces from std::string in C++
- error: use of deleted function
- Remove spaces from std::string in C++
- c++ convert string to hex
- How can I iterate through a string and also know the index (current position)?
- c++ parse int from string [duplicate]
- Hash function for a string
- Call to implicitly deleted copy constructor in LLVM
- expected unqualified-id before string constant