TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK MASINGILL
from: ADAM MAJER
date: 1998-05-13 15:58:00
subject: array of pointers

FM>      int one,two,three, four, five, six, seven;
FM>      int *arrayptr[7] = {&one,&two,&three,&four,&five,&six,&seven};
arrayptr is a is a poiter to an array of poiters :)
FM>    Evidently this is legal because my Borland Version 3 compiler doesn't
FM>complain.  But then, I tried several ways to try to use these addresses to
FM>display numbers and can't find the right combination.  I'm sure it's 
imple
FM>for you guys.  Please show me how I can access one of the values instead 
f
FM>ddress.  If I know that I can code a loop - I think!!
Did you try
    **arrayptr[n] = value
    ^^- two needed because you have a poiter to array _and_ a pointer in
    array :)
 * SLMR 2.1a * All hope abandon, ye who enter messages here.
--- FMail 0.92
---------------
* Origin: The Programmer's Oasis on FIDONET! (1:348/203)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.