title: "gets() was not declared in this scope" error
body: <p>With the following code, I get the "gets() was not declared in this scope" error:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  using namespace std;
  
  int main()
  {
  
     // string str[]={"I am a boy"};
  
     string str[20];`
  
     gets(str);
  
     cout&lt;&lt;*str;
  
     return 0;
  }
  </code></pre>