I'm having the hardest time figuring out how to use pointers properly in c18.
What im trying to do is pass a pointer from a char array and read the value.
Now my test string is
I keep getting a type mismatch error and a few suspicious pointer conversion warnings.
I dont see the mismatch though. Is what I'm doing really wrong ?
What im trying to do is pass a pointer from a char array and read the value.
Code:
void write_lcd(char *str)
{
char *newstr;
int x=0;
unsigned char y=0;
int length;
// length=strlen(*str);
strcpypgm2ram(*str,*newstr); //rom to ram
while(*str)
{
for(x=0;x<8;x++)
{
y=&newstr;
write(Font[y][x]);
}
str++;
}
}
Now my test string is
Code:
const rom char test[]="hello world";
I keep getting a type mismatch error and a few suspicious pointer conversion warnings.
I dont see the mismatch though. Is what I'm doing really wrong ?