title: The type in a dynamic_cast must be a pointer or reference to a complete class type, or void *
body: <p>I am hoping there is someone out there who understands why the code below fails. I am trying to get an instance of PositionAttitudeTransform (Openscenegraph class) from an osg::Node* node object. But there is the compiler error below in bold.</p>
  
  <pre><code> void CameraPosCallbackUpdate::operator()(osg::Node* node, osg::NodeVisitor* nv)
  { 
     // other code goes here
  
      osg::PositionAttitudeTransform* pat = dynamic_cast&lt;osg::PositionAttitudeTransform*&gt; (node);
  
  }
  </code></pre>
  
  <p><strong>IntelliSense: the type in a dynamic_cast must be a pointer or reference to a complete class type, or void *</strong> </p>
  
  <p>Please help me with correct way to access my object and I would appreciate help in understanding what the problem here is since I believe the cast should be possible. </p>
  
  <p><img src="https://i.stack.imgur.com/l8FyX.png" alt="Hierarchy">
  <a href="http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00529.html" rel="noreferrer">http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00529.html</a></p>