各行に番号があるファイルから番号を取得しようとしています。
3
7
8
5
2
1
ファイルからの整数を、insert() というコード内の関数に挿入します。
これは私が持っているものです:
int main()
{ ifstream myfile;
myfile.open("numbers.txt");
while(!myfile == EOF)
{
myfile.getline(myfile,1000000);
insert(myfile);
}
myfile.close();
display();
return 0;
}
このエラー集計 'std::ifstream myfile' has incomplete type and cannot be defined. が表示されます。