¡@

Home 

c++ Programming Glossary: bptr1

Dynamic downcast on private inheritance within private scope

http://stackoverflow.com/questions/6927895/dynamic-downcast-on-private-inheritance-within-private-scope

class A class B private A static void foo void B foo B bPtr1 new B A aPtr1 dynamic_cast A bPtr1 gives pointer B bPtr2 dynamic_cast.. void foo void B foo B bPtr1 new B A aPtr1 dynamic_cast A bPtr1 gives pointer B bPtr2 dynamic_cast B aPtr1 gives NULL Since..

C-Style upcast and downcast involving private inheritance

http://stackoverflow.com/questions/844816/c-style-upcast-and-downcast-involving-private-inheritance

the following piece of code class A class B private A B bPtr1 new B A aPtr1 bPtr1 error A aPtr2 static_cast A bPtr1 error.. of code class A class B private A B bPtr1 new B A aPtr1 bPtr1 error A aPtr2 static_cast A bPtr1 error A aPtr3 A bPtr1 B bPtr2.. A B bPtr1 new B A aPtr1 bPtr1 error A aPtr2 static_cast A bPtr1 error A aPtr3 A bPtr1 B bPtr2 B aPtr3 The C style cast discards..