ADGAN
Full Member level 5
- Joined
- Oct 9, 2013
- Messages
- 295
- Helped
- 4
- Reputation
- 8
- Reaction score
- 4
- Trophy points
- 18
- Activity points
- 1,837
Hi! This is a part of my code which I'm writing in MPLAB C18. It gives the following error.
Error [1153] cannot assign array type objects
Error [1102] cannot assign to 'const' modified object
Error [1131] type mismatch in assignment
I don't know how to correct this error? Pls help.
Error [1153] cannot assign array type objects
Error [1102] cannot assign to 'const' modified object
Error [1131] type mismatch in assignment
I don't know how to correct this error? Pls help.
Code:
char tnum[4],txt[];
void Zero_Fill(char *value) { // fill text representation
if (value[1] == 0) { // with leading zero
value[1] = value[0];
value[0] = 48;
value[2] = 0;
}
}
void rtrim(unsigned char* input){
while (*input != 0)
input++;
input--;
while (*input == ' '){
*input = 0;
input--;
}
}
btoa(day,tnum);
txt = rtrim(tnum);
Zero_Fill(txt);
LCD_TextOut(3,7,txt);