This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

efficient varied string table

Please help. I have been struggling for too long on this. How do I use printf to print any of the messages?

Is this the best way to use a table of varying length strings or is a struct devicestates {}; better, or must I specify fixed length strings in the struct?

char DeviceStates[4][2][25] =
{
  {"closed", "open"},
  {"down", "up"},
  {"on;", "off"},
  {"say not implemented;", "say is implemented;"}
};