I don't like this method. But like I mentioned I don't know what you're up to.
See if this works just as well. If it does, use this:
Code:
public:
const scene::ITerrainSceneNode* get_terrain() const;
Code:
const scene::ITerrainSceneNode* CTerrainNodes::get_terrain() const
{
return terrain;
}