title: C++ No instance of overloaded function getline matches argument list
body: <p>I'm writing a program which needs to read input from cin into a string. When I tried using the regular getline(cin, str) it endlessly prompted for input and never moved on the the next line of code. So I looked in my textbook and it said I could pass a cstring and size of the string to getline in the form of cin.getline(str, SIZE). However, when I do that I get the error "no instance of overloaded function getline matches the argument list.</p>
  
  <p>I searched around, but all I found was people saying to use the getline(cin,str) form which led to the infinite input prompt, or the suggestion that there might be two different getline functions with different parameters in the classes I'm including, and that I need to tell the IDE to use the correct one(I'm not sure how to do that).</p>
  
  <p>This is what I include at the beginning of my file:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;array&gt;
  #include &lt;iostream&gt;
  #include "stdlib.h"
  #include "Bank.h"   //my own class
  
  using namespace std;
  </code></pre>
  
  <p>And this is the relevant section of code:</p>
  
  <pre><code>        const int SIZE = 30; //holds size of cName array
          char* cName[SIZE];   //holds account name as a cstring   (I originally used a string object in the getline(cin, strObj) format, so that wasn't the issue)
          double balance;      //holds account balance
  
          cout &lt;&lt; endl &lt;&lt; "Enter an account number: ";
             cin &gt;&gt; num;       //(This prompt works correctly)
          cout &lt;&lt; endl &lt;&lt; "Enter a name for the account: ";
             cin.ignore(std::numeric_limits&lt;std::streamsize&gt;::max()); //clears cin's buffer so getline() does not get skipped   (This also works correctly)
             cin.getline(cName, SIZE); //name can be no more than 30 characters long   (The error shows at the period between cin and getline)
  </code></pre>
  
  <p>I'm using Visual Studio C++ 2012, if that's relevant</p>