I want to store "What is wrong with you?" in a string str in cpp but when I run this code it only stores "What" in ·str·.
How can I store the complete sentence in the string.
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    string str;
    cin>>str;
    cout<<str;
} 
Input:
What is wrong with you?
Output:
What
 
     
    