【发布时间】:2015-05-23 20:45:05
【问题描述】:
从例子http://www.cplusplus.com/reference/istream/istream/read/有以下语句
ifstream is;
...
...
if (is) { // What overloaded operater of **is** object is called here
....
}
is对象的重载运算符叫什么?
【问题讨论】:
-
@volerag:只有当你已经知道问题的答案——“调用什么重载运算符”——“
operator bool()”。因此,链接是相关的,但问题不是重复的。 -
嗯,@DevSolar 我想我回答了他的问题以及称它为重复。这没什么不对吧?
标签: c++ if-statement