#include <fstream>
#include <string>
using namespace std;
void main()
{
ifstream inputFile("Data.txt");
if(!inputFile.is_open())
return;
//这条语句在VC6下编译报错,VC6对模板支持不够
string str((istreambuf_iterator<char>(inputFile)), istreambuf_iterator<char>());
inputFile.close();
}