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

structure initialization with names in C++

Hi,

I am trying to initialize the structure like below in c++(-cpp11)
struct
{
int a;
int b;
}structType;


structType xyz{.a=5, .b=7};

However the above code is giving me error "expected an expression".
If I use the -c99 option, the other c++ code give