C++ foward structures
The syntax for forward declaring structs in a namespace wasn't immediatly intuitive to me.
When Full Declarations Are Not Required
// Bar.h
namespace MikesHax
{
class Bar {
public: Bar( int inVal );
private: int mVal; };
}
// Foo.h
// Note we don't include Bar.h
namespace MikesHax
{
class Bar;
}
class Foo { public: Foo( MikesHax::Bar const &inBar ); };
When Full Declarations Are Not Required
Labels: programming
0 Comments:
Post a Comment
<< Home