i noticed that when u compile with visual C++ u don't need the throw statement in function headers, but when u compile with g++ u need to explicitly mention all the exceptions u're function might throw.
i mean:
void functionx() throw ( exception1 , exception 2)
{
//blabla
throw exception1;
//blabla
throw exception2;
}
but if u have a base class A and a derived class B, how do u write the throw statement for the B class constructor?
because
B::B() : a() throw ( exception1 , exception2 )
gives the
errorr C2612: trailing 'throw' illegal in base/member initializer list
thx