|
-
July 14th, 2005, 10:56 PM
#1
Casting - Is this allowed
The following works on my compiler (VC 6.0), but is it allowed by the standard?
Converting Derived* → Base* works OK; why doesn't Derived** → Base** work?
If you see in the code, he says that it is an error in C++ to do this...
Code:
Vehicle** vehiclePtrPtr = carPtrPtr;
but this works fine...
Code:
Vehicle** vehiclePtrPtr = (Vehicle**)carPtrPtr;
Is it allowed by the standard.
C++ program ran... C++ program crashed... C++ programmer quit !!   
Regards
Shaq
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|