title: Reading an input with space in c++
body: <p>currently I am doing to read input with spaces in it.</p>
  
  <pre><code>int main() {
    char str[100];
    string st;
    cin.getline(str,100);
    st=str;
  }
  </code></pre>
  
  <p>I want to utilize the functions that come along with the string, so I am reading the input into a string. Is there any other way to read the input directly into the string which also allow space.</p>