I am trying to allocate a dynamic string array in the following way and I get an error:
struct Test
{
std::string producer[];
std::string golden[];
};
Test test1 =
{
{"producer1", "producer2"} ,
{"golden1" , "golden2"}
};
The error i get is that there are too many initializers for std::string[0]
,
but if I get off the array part it works:
struct Test
{
std::string producer;
std::string golden;
};
Test test1 =
{
"producer1" ,
"golden1"
};
Thanks in advance!