Answers for "how do you declare a string in c++"

C++
0

How to write String in C++

char greeting[6] = {'H', 'e', 'l', 'l', 'o', ''};
Posted by: Guest on November-11-2021
-1

how to declare a string c++

// Include the string library
#include <string>

// Create a string variable
std::string greeting = "Hello";
Posted by: Guest on August-20-2021

Code answers related to "how do you declare a string in c++"

Browse Popular Code Answers by Language