私はこのコードを持っています:
static std :: ifstream s_inF(argv[j]);
std :: cin.rdbuf(s_inF.rdbuf());
ファイルが正しく開かれ、問題がないことを確認するにはどうすればよいですか?
つまり、次のようなものを書きたいと思います。
static std :: ifstream s_inF(argv[j]);
std :: cin.rdbuf(s_inF.rdbuf());
if(.....)
{
cout << "can not open the file" << endl;
return 0;
}
...
.....
....
cin.close();
なにか提案を ?