Re: Vectors?
Re: Vectors?
- Subject: Re: Vectors?
- From: Raphael Sebbe <email@hidden>
- Date: Fri, 3 Aug 2001 08:23:31 +0200
Just use NSArray or NSMutableArray. Those can contain any kind of ObjC
objects.
Perhaps some useful notes for C++ programmers:
- all methods are "virtual" in ObjC.
- you have full "RTTI" support : [myObject isKindOfClass:aClass],
[myObject isMemberOfClass:aClass], [myObject
respondsToSelector:aSelector], [myObject class] ...
Raphael
On Friday, August 3, 2001, at 11:42 PM, stuartbryson 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?
Thanks in advance.
Stuart
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
References: | |
| >Vectors? (From: stuartbryson <email@hidden>) |