Mail Archives: djgpp/1999/04/12/02:15:05
This is a multi-part message in MIME format.
--------------6A275222167B166A0DE172BD
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I think u might have typedefined as pointer to structure. Hence mystruct->x
or mystruct->substruct will work(where x and substruct are elements of
mystruct). If substruct is a pointer to the structure inside a primary
structure then it should work. Otherwise u have to use
mystruct->substruct.data.
e.g.
typedef struct
{
int i;
struct
{
int data;
}substruct1;
struct
{
int data;
} *substruct2;
}MYSTRUCT;
MYSTRUCT *mystruct1;
MYSTRUCT mystruct2;
mystruct1->substruct1.data - valid.
mystruct1->i - valid
mystruct2->i - invalid.
mystruct1->substruct1->data - invalid.
mystruct1->substruct2->data - valid.
I hope this will answer u'r Q. If not sent the structure definition u are
using.
Regards Sunil
"CORNU.Nicolas" wrote:
> i 've got a typedef structure, i can access to the first
> elements of the struct (in a function) but when i declare sub structure
> in the primary structure, i've got error:
>
> by: mystruct->substruct->data
> i've got an error: -> is not valid
>
> if i use first elements of struct i haven't got any errors, that's work
> fine.
>
> thanks
>
> --
> CORNU Nicolas
> E-mail: CORNU DOT Nicolas AT wanadoo DOT fr
> ICQ: 31463000
> Homepage: http://perso.wanadoo.fr/nicolas.cornu/Index.htm
--
_______________________________________________________________________
The only place where you get success before work is in your dictionary.
_______________________________________________________________________
--------------6A275222167B166A0DE172BD
Content-Type: text/x-vcard; charset=us-ascii;
name="sunilv.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Sunil V
Content-Disposition: attachment;
filename="sunilv.vcf"
begin:vcard
n:V;Sunil
tel;home:341 4609
tel;work:556 0136 / 138 / 105
x-mozilla-html:FALSE
org:Accord Software & Systems Pvt. Ltd.;Software Division
adr:;;;;;;
version:2.1
email;internet:sunilv AT accord-soft DOT com
x-mozilla-cpt:;-3328
fn:Sunil V
end:vcard
--------------6A275222167B166A0DE172BD--
- Raw text -