Real Guest
|
Problems with const string |
Posted: Wed May 11, 2005 3:15 pm |
|
|
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"
}
}; |
|