#include #include using namespace std; int main(){ char outfile[] = "file.txt"; //読み込むファイルの指定 ifstream fin( outfile, ios::in | ios::binary ); // ファイルを開く // ios::in は読み込み専用 ios::binary はバイナリ形式 if (!fin){ cout << "ファイル file.txt が開けません"; return 1; } // ファイルが開けなかったときの対策 // double d; //文字列ではないデータ string s; while(getline(fin,s)){ cout<