Amiga-C (58/157)

From:Lee Atkins
Date:14 Sep 2001 at 14:34:02
Subject:[amiga-c] Pointers in tables

Hi,

I have a small coding question that I hope someone can help me with.
The situation is this.. I have a large structure that constantly changes
with development and within this structure are pointers to other structures.
I need a way to be able to store the 'position' of a certain value in my
structure so I can look it up in a table.. for example..

An entry in the table would be set up like:
{ "money", structure->substructure->money },

Then a function would be needed that could manipulate the required value
when passed an instance of 'structure' and the string "money".
So what I really want to know is how to put the references to the pointers
in the table so they can be used with any instance of 'structure'. and how
to get them out again.

I hope I've explained it well enough :p

Ash

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of VeriSign's FREE Guide, "Securing Your Web
site for Business" and learn all about serious security. Get it Now!
http://us.click.yahoo.com/r0k.gC/oT7CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/