¡@

Home 

c++ Programming Glossary: accessorfoo

Make interchangeable class types via pointer casting only, without having to allocate any new objects?

http://stackoverflow.com/questions/11219159/make-interchangeable-class-types-via-pointer-casting-only-without-having-to-all

to the runtime casting. Something along these lines Node AccessorFoo fooPtr Node AccessorFoo createViaFactory Node AccessorBar barPtr.. Something along these lines Node AccessorFoo fooPtr Node AccessorFoo createViaFactory Node AccessorBar barPtr reinterpret_cast Node.. using a similar reinterpret_cast to return it as a Node AccessorFoo . The easy way to avoid this is to make these lightweight classes..