Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!hao!ames!ptsfa!hoptoad!academ!killer!jfh From: jfh@killer.UUCP (John Haugh) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: Assigning to Pointers Message-ID: <857@killer.UUCP> Date: Wed, 6-May-87 10:57:32 EDT Article-I.D.: killer.857 Posted: Wed May 6 10:57:32 1987 Date-Received: Sun, 10-May-87 11:46:09 EDT References: <3537@vrdxhq.UUCP> Sender: usenet@killer.UUCP Organization: The Unix(tm) Connection, Dallas, Texas Lines: 38 Summary: Parenthesis help Xref: mnetor comp.sys.ibm.pc:3925 comp.lang.c:2127 In article <3537@vrdxhq.UUCP>, tom@vrdxhq.UUCP (Tom Welsh) writes: > > This may be a dumb question, but could someone please explain > to me how I assign an absolute address to a pointer to an array? > > I'm trying to overlay various structures and arrays at different > times on top of the physical page frame in EMM. > > I'm using MSC 4.0 > > I want to do the following : > > > int *aa[]; This is not a pointer to an array. This is an array of pointers. So, the assignment > aa = 0x50000; doesn't make much sense. If you want a pointer to an array, you could try int **aa; which works nicely, since the [] is really not all that needed (flame retardant statement). If you REALLY want a pointer to an array, how about int *(aa[]); The parenthesis come in real handy at times, for example (small lesson in C to follow :-) when you can't figure out how to declare a 'something' with a weird shape. My weakness is pointers to functions - int foo (); /* this is a function */ int *foo (); /* this is a function RETURNING a pointer */ int *(foo ()); /* pointer to first function */ I won't even bother with POINTER to FUNCTION returning POINTER to FUNCTION returning an integer (the return value of signal() is one of these). - John. Disclaimer: I don't have the slightest idea what I am talking about. I can't handle these problems either.