acces a index string character string code example Example: how to access the element of string in c++ string myString = "Hello"; cout << myString[0]; // Outputs H