Re: Vectors?
Re: Vectors?
- Subject: Re: Vectors?
- From: Peter Ammon <email@hidden>
- Date: Fri, 03 Aug 2001 09:30:40 -0700
on 8/3/01 2:42 PM, stuartbryson at email@hidden wrote:
>
Hi all,
>
>
I am trying to create my own shape classes (sphere, cube etc) with an
>
abstract class called shape in order that I implement polymorphism. I
>
need however a container class. Coming from a C++ background, I would
>
normally use the STL vector class to do this. How might one produce a
>
similar result in Obj-C?
>
I believe that the analog of a vector in the STL is an NSMutableArray in
Foundation. Be aware, though, that you can only store objects (or, more
precisely, pointers to objects) in an NSMutableArray; you can't store
primitive types like ints.
-Peter
References: | |
| >Vectors? (From: stuartbryson <email@hidden>) |