Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!noose.ecn.purdue.edu!orchestra.ecn.purdue.edu!songer From: songer@orchestra.ecn.purdue.edu (Christopher M Songer) Newsgroups: comp.sys.next Subject: Objective C MultiDimensional Array Passing Message-ID: <1991Apr26.191456.13632@noose.ecn.purdue.edu> Date: 26 Apr 91 19:14:56 GMT References: <1991Apr26.162850.8315@daffy.cs.wisc.edu> Sender: root@noose.ecn.purdue.edu (ECN System Management) Distribution: na Organization: Purdue University Engineering Computer Network Lines: 36 Hi, It is possible this does not really belong here, but I can't think of a better place. (I can't find a comp.lang.objc.) Anyway, I have two instances of custom classes. One is a subclass of View and takes care of drawing in my view and one is an "invisible" object (Center) taking care of all the i/o (both with the GUI and files, etc). I want to pass a pointer to a two dimensional array from the invisible class to the View subclass. So I have: Center w/ MyType a[XSIZE][YSIZE]; and I want to pass this to a method in: MyView w/ -setpointers /*the method to set all the drawing data*/ And I want to do it with a call: [MV setpointers: a]; (or something like that, please ignore sloppy syntax, I'm just picking up ObjC extensions and can't call them from memory.) Whenever I declare the method setpointers and try to put array sizes on a variable, the compiler gives me a parse error. So if I try: -setpointers: (MyType *) array[XSIZE][YSIZE] it gives me a parse error on the '['. I do have a hack to get around it, but it leaves me with a warning. What am I missing? Thanks. -Chris