Connecting Tech Pros Worldwide Help | Site Map

enum value not in scope inside class?

  #1  
Old September 27th, 2006, 10:55 PM
Joseph Turian
Guest
 
Posts: n/a

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

  #2  
Old September 27th, 2006, 11:05 PM
Joseph Turian
Guest
 
Posts: n/a

re: enum value not in scope inside class?


Got it, I just realized I shouldn't have the parenthesized values there
and must initialize the array in the implementation.

Thanks
Joseph

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
static class inheritance, generalized Ben Voigt [C++ MVP] answers 49 June 12th, 2007 06:05 PM
How to get enum from a different namespace. toton answers 13 September 22nd, 2006 02:55 PM
Error Trapping In Access 2000 Peter Frost answers 6 November 12th, 2005 11:14 PM
Error Trapping In Access 2000 Peter Frost answers 6 November 12th, 2005 10:50 PM