Hi,
I hope u may have to use like following.
StrCpy(AArray[i].Name , debug);
 
Also u have to allocate memory for struct AStruct  AArray[5]   using  MemPtrNew  befor that.
 
Cheers,
Harsha
L <[EMAIL PROTECTED]> wrote:
Hi,

I am having problem trying to initialize and assign an array of structs.

struct AStruct {
Char *Name
...
}

static struct AStruct AArray[5] = { {0} };

StrCopy(debug,"initialized");
AArray[i].Name = debug; <-- Name does not get string
StrCopy(AArray[i].Name, fileName); <--- does not work!

I want to copy the string in debug to the Name part of the array of struct but this is not working. I thought I should initialize or allocate memory.

Any suggestions?

Thanks,

Luis

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


Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to