指示流是否是好的。
operator void *( ) const;
返回值
运算符返回 null 指针,在 失败。
示例
// basic_ios_opgood.cpp
// compile with: /EHsc
#include <iostream>
int main( )
{
using namespace std;
cout << (bool)(&cout != 0) << endl; // Stream is still good
}
1
要求
页眉: <ios>
命名空间: std