title: using getline to store string in array
body: <p>This is the code:  </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstdlib&gt;
  #include &lt;sstream&gt;
  
  int main()
  {
        char str1[100];
        char str2[100];
        getline(str1,100,'\n');
        getline(str2,100,'\n');
        return 0;
  }
  </code></pre>
  
  <p>I want to read string and store it in array so I in am using this method but it shows the following error on compiling</p>
  
  <pre><code>   [Error]138: error: `getline' was not declared in this scope
  </code></pre>
  
  <p>What is the method of reading string in array.?  </p>