Is there a simpler way for a class\'s constructor to specify that all members of built-in type should be zero-initialized?
This code snippet came up in another pos
For something working in C++98, you can use Boost's value_initialized: (live example)
#include
...
struct Money
{
boost::value_initialized amountP, amountG, totalChange;
boost::value_initialized twenty, ten, five, one, change;
boost::value_initialized quarter, dime, nickel, penny;
void foo();
Money() {/*every member is 0*/}
};