【发布时间】:2012-03-29 01:10:27
【问题描述】:
是否可以使用打开文件的异常来替代使用.is_open()?
例如:
ifstream input;
try{
input.open("somefile.txt");
}catch(someException){
//Catch exception here
}
如果是,someException 是什么类型?
【问题讨论】:
标签: c++ exception-handling inputstream file-handling