At 03:36 PM 6/1/99 -0500, you wrote:
>I am trying to use this function to convert a number to a string to show
>up in a label. i am doing something like this:
>
>....
>Long value;
>CharPtr s, c;
>
>s=StrIToA(c, value);
c is supposed to be a pointer to a chunk of memory you have set up to store
your data in, but I don't see you telling the compiler where it is. The
compiler is not a terribly good guesser. An idea would be to turn on more
warnings - it would have said something like "c is being used before it's
initialized").
(Er, what is s for? it's uneccessary - will point to the same thing as c)
Char c[16];
CharPtr s;
s = StrIToA(c, value);
OR
CharPtr c, s;
c = MemPtrNew(16);
MemSet(c, 16, '\0');
s = StrIToA(c, value);
// don't forget to MemPtrFree(c)