C++ 读取整个文件,每行有不确定的数

double val=0;

vector<double> vecdle;

string sline;

ifstream fin("filename")

while(getline(fin,sline))

{

istringstream ssin(sline);

while(ssin>>val) { vecdle.push_back(val); }

}

THE END