Message-ID: <3390B540.64B66576@abc.se> Date: Sun, 01 Jun 1997 01:33:20 +0200 From: Henrik Baarnhielm MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com Subject: Arrays and Class members, Help! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk I am making a class which has some class members declared with const. They are initialized directly in the class declaration. I thought this couldn't be done, but it worked until I tried to use arrays. Some of the constant variables declared in the class are arrays, both single- and multidimensional. I can initialize them and the compiler doesn't say anything, but when I try to use them the LINKER starts complain, and says there's an undefined reference. I don't understand, could somebody help? Example class foo { private: foo(); void test(); private: const short foovar=200; // <- This works const short footest[13]={0,1,2,3,4,5,6,7,8,9,10,11,12}; // <- This doesn't work const short dummyfoo[2][9]={{0,1,2,3,4,5,6,7,8}, {0,1,2,3,4,5,6,7,8}}; // <- This doesn't work }; Please help me! Thanks -- *************************************** Internet : Henrik DOT Baarnhielm AT abc DOT se Fidonet : Henrik Baarnhielm, 2:201/235 ***************************************