Hello there,
I need a const global string table like this:
Code:
const char* dayOfWeekStrings[7] =
{
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
};
At the moment this declaration is in my c file and in the header i have:
Code:
extern const char* dayOfWeekStrings[7]
And it works. But I thought why not declare it in the header only and so i removed the extern and moved the declaration to header with static:
Code:
static const char* dayOfWeekStrings[7] =
{
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
};
But now the compiller warns me that that logLevelStrings is unused even though it is and it is compiling. Is it a correct aproach? I would apreciate help.