> You need to use a period when referencing a structure member from event.
> If you had declared it as a pointer you could have then used ->
>
> If you declare it like this
> EventType event;
> then you have to use this to reference eType
> event.eType
>
> If you declare it like this
> EventType *event;
> then you have to use this to reference eType
> event->eType
or... you could do this:
(*event).eType
after teaching students C for a number of years now.. they seem
to understand this one better..
int a;
int *ptr;
ptr = &a;
(*ptr) = 10; // puts 10 in a
you use this syntax for basic data types, and you can extend it
onto more complex data types (structs).. the general population
use the "->" instead.. (maybe cause it needs less chars)? :)
cheers.
az.
--
Aaron Ardiri
Lecturer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 352 8192 A/H: +46 26 10 16 11