なぜこのコードが機能しないのですか?エラーメッセージ:main.cpp:147:5:error:expected';' 'fin'の前</p>
string file;
ifstream fin;
fin.clear();
cout << "\n\t--------------------------------Enter Person's name then surname to display------";
cin>>file;
file +=".txt"
fin.open(file.c_str());
char word[50];
fin>>word;
while(fin.good()){
cout << word << " ";
fin >> word;
}
system("pause");
return 0;
}