- 788 名前:141 [2008/04/18(金) 10:29:25 ]
- すみません。以下のコード、BCCでは一応正常にファイルから
読み込んで画面に表示してくれますが、VC++では表示してくれ ません。プログラムで何か処理が抜けているんでしょうか? #include "stdafx.h" // VC++の場合 #include <iostream> #include <fstream> using namespace std; int main() { int i; double x,y; ifstream fin; fin.open("aaa.dat"); while(fin >> i>> x >> y) cout << i << ' ' << x <<' ' << y << endl; fin.close(); // cin>>i; // VC++の場合 return 0; } aaa.datの中身(テキスト) 1 10.0 12.3 2 20.0 20.5 3 30.0 30.8 4 40.0 50.6
|

|