This is one of the downsides of using a C++ compiler but pretending it is C. As soon as you add a member function or member initializer you no longer have a C struct (colloquially known as a POD or "Plain Old Data" but technically known as an "
aggregate") since that is illegal in C and C++ rules apply.