title: Why am I having trouble with getline()? "No instance of overloaded functions matches the argument list" and "data is ambiguous"
body: <p>I've used this exact function before, but simply copy and pasting it to another file has caused it to stop working. The only change is that i added "using namespace std".</p>
  
  <p>In my "ReadData()" function, I'm getting an error on getline(cin, data) that no instance of overloaded functions matches the argument list. Also, I'm getting an error on "data" in the call, saying "data is ambiguous."</p>
  
  <p>The function is supposed to read data from a text file and store the line of text in data for further processing. This function has worked exactly how it is so I'm just not sure.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "NvraArray.h"
  #include "NvraRecord.h"
  
  #include &lt;vector&gt;
  #include &lt;string&gt;
  #include &lt;ctime&gt;
  using namespace std;
  
  // Globals
  string data; // Stores the line that getline is at
  vector&lt;string&gt; rows; // Stores the rows of data
  vector&lt;int&gt; recordNumbersSeen; // Holds records numbers that have been checked
  string strWords[24]; // Holds the individual columns of data for processing
  int rowCounter = 0; // Counts the rows of data coming in
  
  // Prototypes
  // Reads the data from cin into the "rows" vector
  void ReadData();
  // Checks the current row against the list of records already seen
  bool isDuplicate(int recordID);
  // Checks the current row for invalid data
  bool isValidData();
  // Splits the row into an array to process
  void SplitRowIntoArray(std::string row);
  
  int main(){
  
      // For testing purposes
      srand(time(NULL));
  
      NvraArray array;
      NvraRecord record;
  
  
  
      system("pause");
      return 0;
  }
  
  void ReadData(){
      while(getline(cin,data)){
  
          // if on the first row, do nothing and skip to the next.
          if(rowCounter != 0){
  
              rows.push_back(data);
          }else{
              rowCounter++;   
          }
      }
      rowCounter = 0;
  }
  </code></pre>