i'm trying to use getline to read from a file into a std::string and when i give it the normal 2 parameters (my ifstream and the string) the compiler says it wants 3 arguments , but when i give it 3 it says it wants 2 arguments. this makes absolutly no sense to me! plus i can't imagine what third parameter getline could possibly need anyway.
heres a snippit just to illustrate:
#include <fstream>
#include <string>
using std::string;
using std::getline; /*i need to do this for getline to be recognized...could
std be the wrong one??*/
ifstream ccin;
...
ccin.open(data.dat);
string str;
getline(ccin,str);//the problem :(
ccin.close();
...
am i retarded? or is the compiler...