In other words, why does the compiler complain about things like this:
class Integer {
int i = 3;
};
Although this is a really silly example, there are many cases in which classes have members which can be by default initialized to some value (for example some internal counter which always is default initialized to zero). What is the reason for forbidding these default initializations outside of the class constructors?
As said in the comments, in C++11 you actually can do it like you showed. It’s still illegal in C++98/C++03 however.
Edit: To answer your question however: I don’t know :p maybe the language designers didn’t think anyone would want to do that at the time of publishing C++98. In any case you certainly can do it now with C++11.