c++ write string

#include <iostream>
#include <string>

int main() {
    // Declare a string variable named 'myString'
    std::string myString;

    // Assign a value to the string variable
    myString = "Hello, World!";

    // Print the string to the console
    std::cout << "String Value: " << myString << std::endl;

    // Get the length of the string
    int length = myString.length();

    // Print the length of the string
    std::cout << "String Length: " << length << std::endl;

    // Concatenate another string to 'myString'
    myString += " How are you?";

    // Print the updated string
    std::cout << "Updated String: " << myString << std::endl;

    // Access individual characters in the string
    char firstChar = myString[0];
    char fifthChar = myString[4];

    // Print the first and fifth characters
    std::cout << "First Character: " << firstChar << std::endl;
    std::cout << "Fifth Character: " << fifthChar << std::endl;

    return 0;
}