www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/05/21:32:20

From: "Bob" <fubu36 AT stny DOT rr DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: pointers and arrays
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <emRG4.2308$bh.24017@typhoon.nyroc.rr.com>
Date: Thu, 06 Apr 2000 01:02:02 GMT
NNTP-Posting-Host: 24.95.139.17
X-Complaints-To: abuse AT stny DOT rr DOT com
X-Trace: typhoon.nyroc.rr.com 954982922 24.95.139.17 (Wed, 05 Apr 2000 21:02:02 EDT)
NNTP-Posting-Date: Wed, 05 Apr 2000 21:02:02 EDT
Organization: Time Warner Road Runner - Binghamton NY
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Is it legal in c++ to declare a pointer to a multi-dimensional array on the
free space? ie.
     short* grade = new short[gradeNum][studentNum];
when I try this line I get a error of "initialization to 'short int *' from
'short int (*)[((studentNum - 1) + 1)]'
thanks


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019