String
#include <string> // Include string (std namespace)
string s1; // Create strings
s1 = "hello"; // assign
s1.size(); // number of characters in string
s1[0]; // 'h'
s1.substr(m, n); // Substring of size n starting at s1[m]
s1 = to_string(12.05); // Converts number to string
Last updated