| ??? 05/02/02 20:47 Read: times |
#22430 - RE: Memory & strings; AT89C51 |
char numstr;
unsigned long num = 500; sprintf( numstr, "%lu", num ); You seem to have an error there. Try defining numstr as something like: char numstr[10]; You need to define the length of the numstr string, otherwise the compiler assumes 1 byte. And that's only enough room for the NULL at the end of the string not to mention any characters that are output by sprintf. Craig Steiner |



