Tag: Convert a char to string in C++
Convert a char to string in C++
In this article, we will discuss different ways to convert a char value to a string in C++. Table Of Contents Method 1: Using string constructor Method 2: Using string::push_back() function Method 3: Using std::stringstream Method 4: Using += operator Method 5: Using assignment operator Method 6: Using string::append() function Method 7: Using string::assign() function …