getline()函数链接错误

众位好汉,小弟在ubuntu 11.04里build一个程序,可是总提示getline函数出错,C/C++ code
/home/chad/tinymudserver_v2_2/tinymudserver/utils.h|26|error: no matching function for call to ‘getline(std::ifstream&, std::string&)’|


库文件包含,或者路径设置出错吗?望指点!

作者: lvcayu   发布时间: 2011-06-13

编译的是在网上找的一个mud服务器程序,出错部分代码如下:
C/C++ code
void LoadSet (ifstream & f, T & s)
{
  s.clear ();
  string sLine;
  std::getline (f, sLine);   // get one lined
  istringstream is (sLine); // convert back to stream
  string flag;    // each flag name
  while (!is.eof ())    // read that stream
    {
    is >> flag;   // read flag
    s.insert (flag);  // and insert it
    } // end of getting each item  
} // end of LoadSet

作者: lvcayu   发布时间: 2011-06-13