Having a structure like this in C++11:
struct von
{
std::string Name;
unsigned int ID;
std::vector<std::string> Checks;
};
Should it be initialized like this:
von v = {"",0,{}};
Or like this:
von v = {};
Both ways seem to work, but the compiler warns about -Wmissing-field-initializers
on the latter example.
Edit:
Here are my compiler options:
g++ main.cpp -ansi -Wall -Wextra -Weffc++ -std=c++0x
I'm using g++ (Debian 4.6.2-12) 4.6.2