How to read data from files in Turbo c++ 4.0?

随声附和 提交于 2019-12-02 13:26:59

The std::cout should be inside the while loop:

while(!inFile.eof()){
     inFile >> x >> y;
     cout << x << " " << y;
}

Try using infile>>x>>y inside the while loop condition like this

while(infile>>x>>y)

then use the cout statement in the loop.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!