S
sigi
i've got something like this in a headerfile:
const char* const StringList[]=
{
"FirstString",
"SecondString",
....
}
(haven't checked the syntax yet, but i guess it's ok?)
there can be more than one such list, later on i decide which to take and
use this to fill a std::map (i also got some defines to make code easier to
read... )
my questions:
is there any way to get number of strings in this list? if they were fixed
length there's the trick using sizeof var / sizeof var[0].
it would be easy to provide a const of values in this list, or having a
special "stop string" - just out of curiosity...
but i guess if there's something i would rather be compiler specific and
therefor this question won't belong here
const char* const StringList[]=
{
"FirstString",
"SecondString",
....
}
(haven't checked the syntax yet, but i guess it's ok?)
there can be more than one such list, later on i decide which to take and
use this to fill a std::map (i also got some defines to make code easier to
read... )
my questions:
is there any way to get number of strings in this list? if they were fixed
length there's the trick using sizeof var / sizeof var[0].
it would be easy to provide a const of values in this list, or having a
special "stop string" - just out of curiosity...
but i guess if there's something i would rather be compiler specific and
therefor this question won't belong here