When I initialize a single element into a void structure, it works fine:
void* CMD_ARRAY[] =
{
{"+++\r"},
{"+++\r"},
{"+++\r"},
};
However, when I try to add more elements to the structure, i.e.:
void* CMD_ARRAY[] =
{
{"+++\r" , 4, 1300},
{"+++\r" , 4, 1300},
{"+++\r" , 4, 1300},
};
This results in an error:
expected a "}"
What is the difference between a single element as in the 1st example, and a structure of a structures (which are also considered as elements)?
How can I achieve initialization of this void structure with mixed types?
Update: So I understand that the compiler doesn't know how to handle different types in the same elements. Is there a way to define these types on the fly (i.e. using casting) without actually defining the structure outside this definition (i.e. using an array of strucutres)?