|
|
|
| |||||
|
|
| ||||||
|
|
|||||||
|
|
home translate to German (by SYSTRAN)
|
|
|
Bool ConditionsSee 6.4 Selection statements [stmt.select], paragraph 4, of the C++ standard.
struct A
{
inline operator int()
{ return 0; }
inline operator bool()
{ return true; }
};
// the main function should return 0
int main(int argc, char *argv[])
{
A a;
if (a)
{
return 0;
}
else
{
return 1;
}
}
| |||
This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.
|
Revision: 1.2, http://cmeerw.org/prog/freecpp/bool_condition.html Last modified: Thu Dec 26 14:48:28 2002 |
Christof Meerwald <cmeerw@cmeerw.org> XMPP: cmeerw@cmeerw.org |