zzeroo
Joined: 17 Jun 2013 Posts: 18
|
Pointer to array of chars |
Posted: Fri Oct 18, 2013 9:01 am |
|
|
Hi, I do not found a CCS valid solution for this problem. The following code are from a arduino library that I try to port for my PIC18.
I've a array of chars like this one
Code: |
const unsigned char Tahoma10[] ={
// Font Header
0x01, // 0x00: Monospace, 0x01: Proportional
0x02, // 0x00: horizontalLeft, 0x01: horizontalRight
// 0x02: verticalCeiling, 0x03: verticalBottom
0x20, // Start character
0x5F
}
|
Where bounding_box_t is a stuct, but that's not the point.
Code: |
typedef struct {
char x1;
char y1;
char x2;
char y2;
} bounding_box_t;
|
The arduino library works with functions like this one (just the prototype for simplicity).
Code: |
bounding_box_t draw_text(char string, long x, long y, char font, char spacing);
|
If I call these I've got a compiler "Error#165 No overload function matches". I think this happens because the pointer that way.
Code: |
draw_text("Z", 10, 10, Tahoma10, 1);
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Oct 18, 2013 11:14 am |
|
|
Post a small compilable test program that shows the error, and
post your compiler version. I should be able to copy and paste the
program into MPLAB, without any editing, and compile it and see the
error message. |
|