问一个不明白的小疑点~C++文档读取

问一个不明白的小问题~C++文档读取
#include<iostream>
#include <string.h>
#include <fstream>
using namespace std;
void main()
{
fstream fin;
fin.open("G://ori.txt");
string str;
while (!fin.eof())
{
fin.getline(str);
cout<<str;
}
system("pause");
}

这个在我的Visual Studio2005上运行会出错
error C2661: “std::basic_istream<_Elem,_Traits>::getline”: 没有重载函数接受 1 个参数
就是想逐行读取一个文档的内容(包括空格的)然后进行逐个单词的处理
求教,谢谢啦
------解决思路----------------------
fin.getline只能用于char [],不能用于string类。用std::getline就行了
        getline(fin, str);
        cout<<str<<endl;