Try: StrCopy( var->name, "some text" );

As var is a POINTER to a TestType struct according to your TestType* var
declaration. 

Stuart Nicholson
Programmer
Firepad Inc.

-----Original Message-----
From: Chad Harrison [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 8:27 AM
To: Palm Developer Forum
Subject: cannot StrCopy




here is my typedef struct:


#define NAME_SIZE  25
#define TITLE_SIZE 25
#define DETAIL_SIZE 1000
#define RECORD_SIZE (sizeof(TestType)


typedef struct{
        char name[NAME_SIZE + 1];
        char title[TITLE_SIZE + 1];
        char detail[DETAIL_SIZE + 1];
}TestType;



then, I create memory pointers, so that I can zero them out and write to
them

TestType *var = MemPtrNew(sizeof(TestType);
MemSet(var,sizeof(TestType),0);

but, then when I try

StrCopy(var.name, "some text");


I get "not a struct/union/class" error at compile


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

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

Reply via email to