I'm trying to compile the following function for the PIC14 port:
void Writef( char *string) {
while(*string != 0) {
putchar(*string);
string++;
}
}
Note, no printf in the PIC14 port.
I call it as:
Writef('The quick brown fox jumps over the lazy dog.\0');
I get the following error from sdcc when trying to compile:
serial-soft.c:117: error 88: illegal cast of LITERAL value to 'generic'
pointer
from type 'literal-unsigned-char'
to type 'char generic* '
Now I've not programmed in C for quite a while, and pointers were never my
strong point. Can any kind sole give me a hint?
Thanks,
Pete
|