How to declare strings in enum in C
- by Sridevi
Hello,
typedef enum testCaseId
{
"TC-HIW-0019" = 0,
"TC-HIW-0020",
"TC-HIW-0021"
} testCaseId;
I need my test cases to be represented in enum. In my test function, I need to switch between the test cases like:
void testfunc(uint8_t no)
{
switch(no)
{
case 0:
case 1:
default:
}
}
So can anyone help on how to use enum to declare strings.