From: "Martin Ambuhl" Newsgroups: comp.os.msdos.djgpp Subject: Re: Dynamic Arrays and C++ Date: Fri, 26 Jun 1998 00:05:54 -0400 Organization: Nocturnal Aviation Lines: 32 Message-ID: <6mv6ki$gc0@news-central.tiac.net> References: NNTP-Posting-Host: p3.tc1.newyo.ny.tiac.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Brett Kugler wrote in message ... :Ok, I don't usually post here, but I've run out of options. I've been :trying to figure out why I'm getting an error on this line of code: : : int *test = new int[8][8]; : :The error I get is: : main.cpp:15: initialization to `int *' from `int (*)[8]' : :According to my C++ book (How To Program C++ by Deitel), that is a :perfectly valid statement. I only have a vague notion of what the compiler :is trying to tell me. I have tried: =============== I would really be surprised in D&D have any reference that you can cite for your assertion. Your compiler is telling you that your types don't match. They don't. ================ : : int *test = new int[8]; : :and this works, so it's something to do with the extra dimension in the :array. The reason I'm posting here is because I'm trying to compile with :DJGPP and the book I have indicates that this should work, but it doesn't. : :Any ideas? : :Thanks, :Brett :