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 CCS Technical Support

Problems with const string

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







Problems with const string
PostPosted: Wed May 11, 2005 3:15 pm     Reply with quote

Why isn't this possible with the ccs compiler?
I get an error with the pointer to the string, which is constant...



#define SETTINGS_PINCODE 1
#define SETTINGS_XXXXX 2
#define SETTINGS_YYYYY 3

typedef struct
{
unsigned int8 setting;
unsigned int8 settingEEpromAddress;
unsigned int8 settingMaximumLength;
unsigned int8* defaultValue;
}Tsetting;


const Tsetting defaultSettings[] =
{
{
SETTINGS_PINCODE,
0,
20,
"Setting1 Default\0"
}
,
{
SETTINGS_XXXXX,
20,
20,
"Setting2 Default\0"
,
{
SETTINGS_YYYYY,
40,
20,
"Setting3 Default\0"
}
};
Ttelmah
Guest







PostPosted: Wed May 11, 2005 4:15 pm     Reply with quote

Because CCS does not support pointers to constant strings. It is in the manual.

Best Wishes
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