Re: C question!
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Fri, 8 Aug 2008 22:29:20 -0400
"Robby" <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:513D47C1-CE7C-4F67-918B-7307C0E87A71@xxxxxxxxxxxxx
If I have a variable (lest call it "x") containing a number between 1
and 10 where this variable is to contain the numerical value
corresponding
to a member of a structure, how can I access the member? For sample
purposes, right now I am using a structure.
For example:
============================================
struct msgs{
int MSG1;
int MSG2;
int MSG3;
int MSG4;
int MSG5;
int MSG6;
int MSG7;
int MSG8;
int MSG9;
int MSG10;
} *obj_msgs_x;
Why not just have an array of 10 integers?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: C question!
- From: Robby
- Re: C question!
- References:
- C question!
- From: Robby
- C question!
- Prev by Date: Re: C question!
- Next by Date: Re: C question!
- Previous by thread: Re: C question!
- Next by thread: Re: C question!
- Index(es):
Relevant Pages
|
Loading