CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Pointer to array of chars

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
zzeroo



Joined: 17 Jun 2013
Posts: 18

View user's profile Send private message

Pointer to array of chars
PostPosted: Fri Oct 18, 2013 9:01 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Oct 18, 2013 11:14 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group