Re: final vs const

1998-08-29 Thread Dimitris Vyzovitis
Gao Lei wrote: Hi, guys, I have a question during my developing, In Java it is very easy to assign different final value sto different instances of an object, but when in C ++, it is difficult, especially for an array. Like following, class CPPCls {     const int iarray[10];     ... } How to

Re: final vs const

1998-08-28 Thread Gao Lei
Thanks all, I have gotten an answer of this problem, Sorry for this non java question again. Thanks. The answer as following, class test { private: int _a[3]; public: const int (&a)[3]; public: test(const int x[3]); ~test(); }; test::test(const int x[]) :

final vs const

1998-08-27 Thread Gao Lei
Hi, guys, I have a question during my developing, In Java it is very easy to assign different final value sto different instances of an object, but when in C ++, it is difficult, especially for an array. Like following, class CPPCls { const int iarray[10]; ... } How to initialize t