#include<iostream> 
#include <string>
#include<fstream> 
using namespace std;void main()

ifstream fin("a.dat");
string s;  if (fin==NULL)
{
cout<<"ERROR"<<endl;
}
while (getline(fin,s))
{

cout<<s<<endl;

}

这些代码把dat文件中的字符串全部加载   我想成行加载或用空格分开加载该怎么写?