www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/15/07:56:09

Subject: Implementation of C++...the return
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Wed, 15 Feb 1995 11:15:00 +0000 (GMT)
From: "B.S.Runnacles" <B DOT S DOT Runnacles AT soton DOT ac DOT uk>

Dear all 

Re my problem with arrays of objects...

Here is an approximation to the code that would not compile,

TiffImage Images[NUMBER_OF_IMAGES];

(NUMBER_OF_IMAGES is defined in a preprocessor directive) were upon, 
the compiler apologised.  I also tried

TiffImage *Images = new TiffImage [NUMBER_OF_IMAGES];

which complied fine, except for when I tried to access the members via
the normal subscripting, i.e Images[1] started talking about pointer offsets.

I will try a bag (what is a bag anyhow?...just off to the library me thinks).

Love and Hugs

Ben Runnacles
Vision Speech and Signal Processing Group
University of Southampton, UK.

- Raw text -


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