468,504 Members | 1,956 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,504 developers. It's quick & easy.

enum value not in scope inside class?


I try to compile the following:

===
typedef enum { CREATED, ADDED_TO_AGENDA, POPPED_FROM_AGENDA,
DUMMY_LAST_CAT } DStatCat;

class DerivationStatistics {
....
private:
enum {MAX_LENGTH = 1000};

typedef boost::multi_array<unsigned, 3Array;
static Array(boost::extents[DUMMY_LAST_CAT][MAX_LENGTH][2])
counts;
===

The last line triggers the following compile error:
"error: 'DUMMY_LAST_CAT' was not declared in this scope"

How can I resolve this? Thanks.
Joseph

Sep 27 '06 #1
1 4401
Got it, I just realized I shouldn't have the parenthesized values there
and must initialize the array in the implementation.

Thanks
Joseph

Sep 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Alexander Grigoriev | last post: by
20 posts views Thread by Glenn Venzke | last post: by
2 posts views Thread by Alex Feldman | last post: by
1 post views Thread by Vincent RICHOMME | last post: by
13 posts views Thread by toton | last post: by
34 posts views Thread by Steven Nagy | last post: by
9 posts views Thread by subramanian | last post: by
3 posts views Thread by dev_15 | last post: by
8 posts views Thread by oaksong | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.