An I/O compiling error

So Im trying to use the code to read from two files with commandline generated names. And now it has one error. which is no matching functions for call for the getline(teamA_Num); Can someone tell me what is wrong? How can I SOLVE THIS?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <fstream>
#include <istream>
#include <string>

using namespace std;

int main(int argc, char* argv[])
{
   int teamA_Num;
   std::string teamA_name;
   ifstream teamA (argv[1]);
   std::getline(teamA,teamA_name);
   std::getline(teamA,teamA_Num);


    return 0;
}
Last edited on
Hi,

A quick read of the reference manual might help a bit :+)

http://www.cplusplus.com/reference/string/string/getline/
Topic archived. No new replies allowed.