Mail Archives: djgpp/2000/07/21/05:31:01
From: | Anthony Appleyard <Anthony DOT Appleyard AT umist DOT ac DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | How to convert mode to "pointer to array"?
|
Date: | Fri, 21 Jul 2000 09:36:49 +0100
|
Organization: | UMIST, Manchester, UK
|
Lines: | 13
|
Message-ID: | <39780BA1.7354F5D2@umist.ac.uk>
|
NNTP-Posting-Host: | aa1.mt.umist.ac.uk
|
Mime-Version: | 1.0
|
X-Mailer: | Mozilla 4.04 [en] (Win95; I)
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I wrote a Gnu C++ program with this text in;-
class atom{public: double x,y,z; char mat,vis; atom(){};
atom(xyz c,char m=0,char v=0){x=c.x; y=c.y; z=c.z; mat=m; vis=v;};
atom((*C)[N+1][N+1])= /*HERE*/ malloc((N+1)*(N+1)*(N+1)*sizeof(atom));
My Gnu C++ compiler accepts this, but moans that implicit conversion
from void* to a pointer is non-ANSI, so I likely couldn't use that
program text in my good old faithful Borland C++ 4.52 for Windows. To
make this text ANSI, what should I insert at /*HERE*/ ?
- Raw text -