#include #include #include using namespace std; int main() { string str{"How are you?"}; cout << str << endl; cout << str[3] << endl; cout << "Enter \"Hello world\":"; /* string helloworld; cin >> helloworld; cout << helloworld << endl; //This does not work because space and enter are read the same way, so when the space between hello and world is entered, the computer understands that the input has finished. */ cout << "Enter \"Hello world\" again:"; string helloworld2; getline(cin,helloworld2);//This is the alternative. cout << helloworld2 << endl; }