Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Address of array Message-ID: <530@umcp-cs.UUCP> Date: Tue, 25-Mar-86 16:18:19 EST Article-I.D.: umcp-cs.530 Posted: Tue Mar 25 16:18:19 1986 Date-Received: Sun, 20-Apr-86 11:58:01 EST References: <750@abic.UUCP> <2293@utcsri.UUCP> <313@hadron.UUCP> <2377@utcsri.UUCP> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 29 In article <2377@utcsri.UUCP> greg@utcsri.UUCP (Gregory Smith) writes: > char *char_ptr, (*char_ar_ptr)[80]; > ++ char_ptr; /* add 1 to the actual value of char_ptr */ > ++ char_ar_ptr; /* add _80_ to the actual value of char_ar_ptr */ > /* i.e. point to the next array in a list */ Yes. > char line[80]; /* this is what I want to point it at */ > char_ar_ptr = &line; /* this should work ... */ Debatable. This works, and is probably even what you `really' mean: #define N 2 /* e.g. */ char lines[N][80]; char_ar_ptr = lines; If you only have one line, why do you need to point at a set of lines? -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu