Lauren,

Both errors seem to relate to the same thing.  It doesn't appear that the
compiler understands what a StudentRecord is.  Where is the typedef for the
StudentRecord actually placed in your code.  It either needs to be in the
same file and occur before it's used, or more commonly it should be in a .h
file and the .h file should be included (using a #include) early in the
souce file where a StudentRecord is used.

Hope that helps,

-Ron
Amherst, NH


"Lauren B. Robert" <[EMAIL PROTECTED]> wrote in message
news:96279@palm-dev-forum...
>
> Hi All, I'm having a small problem here, hope somebody can tell me what's
wrong. I have a database that contains several records, which all share the
same struct.
>
> typedef struct {
>    Int32 ID;
>    const char *Class;
>    const char *Name;
>    const char Gender;
> } StudentRecord;
>
> Hence, I did the following codes to display only the names on a dynamic
list.
>
>    MemHandle RecordHa;
>    UInt16 indx, NumRecor;
>    char *RecordPointr;
>    Char *rec;
>
> for (indx=0; indx < NumRecor; indx++)
> {
>   RecordHa = DmQueryRecord(MyDB, indx);
>   StudentRecord *rec = (StudentRecord *) MemHandleLock(RecordHa);//Error1
>   RecordPointr = rec->Name + StrLen(rec->Name) + 1;//Error2
>   MemHandleUnlock(RecordHa);
> }
>
> When I compile, I had 2 errors as show above. Error1 says: expression
syntax error StudentRecord. Error2 says: not a struct/union/class rec->Name.
I don't know what's actually is wrong, can somebody help me please?
>
> Many Thanks
> Regards,
> Lauren
>
>
>
>
>
> ____________________________________________________________
> Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS
> http://www.mail.lycos.com/brandPage.shtml?pageId=plus
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to