cpp strin code example Example 1: c++ string #include <string> std::string myString = "Hello, World!"; Example 2: c++ stirng #include <string>