non-static const array class-member

From: zoe (zoesaddress_at_yahoo.com)
Date: 12/12/03


Date: 12 Dec 2003 08:53:11 -0800

Is it possible to initialize a non-static const array class-member of
a fundamental type?

Something like:

class Foo{}{
   public:
      Foo();
   private:
      const int myArray[];
};

Foo::Foo() : myArray({1,2,3}) {}

this does not work of course. But is it possible in some other way?

regards
Zoe



Relevant Pages