D
Почему они ведут себя по-разному?
#include <iostream>
struct Answerer {
int theAnswer {42};
};
int main(int argc, const char * argv[]) {
int declaratedInt; //variable declaration
Answerer answerer; //class object declaration?
// No it is not -- the class is already initialized:
std::cout << answerer.theAnswer << std::endl;
return 0;
}