Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > forward declaration and enums

Thread Tools

forward declaration and enums

Posts: n/a
I have the following class which won't compile in VS2008.

#include "Image.h"

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

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

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

but is there a better way of doing it?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Forward declaration of enums Francesco S. Carta C++ 13 07-18-2010 03:17 PM
Forward Declaring enums' for header? Travis C++ 1 08-15-2007 04:52 PM
Enums without identifier, enums and typedef =?utf-8?b?QXNiasO4cm4gU8OmYsO4?= C Programming 10 01-20-2007 01:20 AM
Forward declarations of class member enums? Steven T. Hatton C++ 2 11-20-2006 05:15 AM
Re-forward declaration of types which were already forward declared qazmlp C++ 1 02-15-2004 07:00 PM