Exceptions are possibly your
second problem, the very first one is the
C/C++
comma operator (see, for instance:
"Comma operator" at Wikipedia[
^]). The expression inside the if braces evaluates to non-zero because
&ex
, being the valid aadress of an object, is not NULL: try the following code
#include <iostream>
using namespace std;
int main()
{
if ( 0, 5)
cout << "hello" << endl;
}