??? 05/11/08 13:30 Read: times |
#154680 - Another Problem You Have... Responding to: ???'s previous message |
Your ElapsTime variable is a single character variable and yet you pass a string pointer to it. The strcat will not know where the end of the "string" is because you did not arrange for a sure zero at the end of the "string".
You should have a separate buffer for a working string and maybe use a sprintf() type function to format the ElapsTime variable into this separate buffer. Then pass the pointer to the separate buffer to strcat() so it has a legitimate string to manipulate. You could also make the ElapsTime variable into a two byte array and set the second element to a value of zero. Then the line of code that increments the first byte value could become: ElapsTime[0]++; Michael Karas |
Topic | Author | Date |
LCD message format with strcat | 01/01/70 00:00 | |
Pointers in 8051 | 01/01/70 00:00 | |
Managed pointers.... | 01/01/70 00:00 | |
Hmmm.... | 01/01/70 00:00 | |
Ha Ha Ha.... | 01/01/70 00:00 | |
Hmmm, indeed | 01/01/70 00:00 | |
MK is right about the italics.. | 01/01/70 00:00 | |
You (and MK) are right! | 01/01/70 00:00 | |
Another Problem You Have... | 01/01/70 00:00 | |
I actually did not want a sprintf .. | 01/01/70 00:00 | |
Converting integers to strings | 01/01/70 00:00 | |
Getting better but not there still | 01/01/70 00:00 | |
Yet another problem | 01/01/70 00:00 | |
But I am concenating into DispMsg. | 01/01/70 00:00 | |
No you're not ???![]() | 01/01/70 00:00 |