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