title: strcpy was not declared in this scope?
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
      char Buffer[20] = {'\0'};
  
      cout &lt;&lt; "Enter a line of text: " &lt;&lt; endl;
      string LineEntered;
      getline (cin, LineEntered);
  
      if ( LineEntered.length() &lt; 20 ){
          strcpy(Buffer, LineEntered.c_str()); // This strcpy. is not declared in scope for some reason.
          cout &lt;&lt; "Buffer contains: " &lt;&lt; Buffer &lt;&lt; endl;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>main.cpp:14:43: error: 'strcpy' was not declared in this scope
  </code></pre>
  
  <p>Why is it having this error?</p>