Chris
venkatesh wrote:
Hi all,
When executing this function the first three constants are assigned in the array properly but in the else part the remaining values 3 to 19 stores the last value “19”. I think I’m doin something wrong in the conversion. Pls help!
static char * itemName[20];
Int16 icheck;
for (int i=0;i<20;i++)
{
char my[10];
char *conStr;
StrIToA(my, icheck);
StrCopy(super,my);
if(icheck == 0)
itemName[icheck]="Hello1"; else if(icheck == 1)
itemName[icheck]=" Hello2"; else if(icheck == 2)
itemName[icheck]=" Hello3"; else
itemName[icheck]= conStr;
}
Thanks in advance.
Venkat
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
