The first parameter of StrIToA is a pointer to a character. In other words, a pointer to the memory you want the string to be stored in. You have to allocate this memory from the OS b4 you try to put anything in it. You can either allocate on the stack with an array or on the heap with MemPtrNew. To allocate an array you write: char MyString[SomeLength]; To allocate on the heap write: char *MyString=(char*)MemPtrNew(SomeLength); Note using an array is "easier" because the memory is freed after the variable looses its scope but if you use MemPtrNew you are responsible for freeing memory yourself with MemPtrFree (failure to do so causes memory leaks).
Thats just a brief intro, if you need to know more read a book on C programming. Good luck, Mike > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Akhil > Bhandari > Sent: Monday, March 04, 2002 7:32 AM > To: Palm Developer Forum > Subject: RE: slider value control ---pls help urgent > > > please be clear, Allocate ur string??????????????? > i just used StrIToA function > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On > Behalf Of Ludovic > Ferrandis > Sent: Tuesday, September 03, 2002 6:54 PM > To: Palm Developer Forum > Subject: Re: slider value control ---pls help urgent > > > you have to convert the int to char. > > Check the StrIToA function. > Don't forget to allocate your string or use a char > array. > > > > Akhil Bhandari wrote: > > hi, > > get value from slider control returns me a > integer > > value. > > i want to display the set contol value as a label > > below it please help > > > > int val; > > const char * strval; > > > > val = > > > CtlGetValue(GetObjectPtr(VolumeControlVolumeFeedbackSli > > derControl)); > > strval = (char *)val; > > > > > CtlSetLabel(GetObjectPtr(VolumeControlLabLabel),strval) > > ; > > > > tried this but it does'nt work,please suggest any > > alternative. > > > > regards > > akhil. > > > > > > > > > -- > For information on using the Palm Developer Forums, or > to unsubscribe, please see > http://www.palmos.com/dev/support/forums/ > > > -- > For information on using the Palm Developer Forums, or to > unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
