forward declaration and enums

B

Barry

I have the following class which won't compile in VS2008.

#include "Image.h"

class b : public std::map<const b_e, const Image>
{
public:

enum b_e {ONE,TWO};
};

How would you fix this problem? The only solution I have come up with
is this -

#include "Image.h"

class b
{
public:

enum b_e {ONE,TWO};
std::map<const b_e, const Image> i;
};

but is there a better way of doing it?

Thanks,

Barry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top