
16 Aug
2005
16 Aug
'05
8:48 a.m.
Hi,
"Thorsten Ottosen"
what's the difference? A c-style cast is also a const-cast.
-Thorsten
I notice nobody has pointed you in this direction but Scott Meyers in more Effective C++ discusses in Item 2 ("Prefer C++ style casts") why it is preferable to use the new C++ style casts. Key points: * Easier to understand why a cast is happening * You can explicitly say what you are casting to * It is much easier to search for exactly where you are casting in your code * More fine grained control I am not a fantastic programmer but I feel that I have learnt a lot from his books. Out of all the reference/text books that I have purchased I think these books have been the best. Peter.