cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/06/06:26:36

From: demandrd AT compusmart DOT ab DOT ca (Demandred)
Newsgroups: comp.os.msdos.djgpp
Subject: Question on pointers and arrays
Date: Thu, 06 Feb 1997 00:47:46 GMT
NNTP-Posting-Host: remote40.compusmart.ab.ca
Message-ID: <32f92a6c.0@ntnews.compusmart.ab.ca>
Lines: 16
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Probably a silly question, but...

If I declare an array of objects of type Foo

Foo FooArray[5];

And pass a pointer to a Foo into a function (or class constructor)

Bar(Foo *array) {...

Can I access elements in the array in the function, like so?

...array[3]...}

Thanks for the help.

- Raw text -


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