Re: OOP
"Sjouke Burry" <burrynulnulfou r@ppllaanneett. nnlllwrote in message
There are some snags. For instance if we write a "constructo r" in C the
natural thing to do is to return a null pointer if the function fails. There
is no way to do this in C++. So the solution is to throw an exception. Which
means that if you use constructors that either validate parameters or
acquire resoruces, exceptions are mandatory.
--
Free games and programming goodies.
"Sjouke Burry" <burrynulnulfou r@ppllaanneett. nnlllwrote in message
Why not just use the features you want and ignore the
ones you dont like??
The language will work just as well.
>
ones you dont like??
The language will work just as well.
>
natural thing to do is to return a null pointer if the function fails. There
is no way to do this in C++. So the solution is to throw an exception. Which
means that if you use constructors that either validate parameters or
acquire resoruces, exceptions are mandatory.
--
Free games and programming goodies.
Comment