Variables need to be declared and defined and the draft C++ standard section 9.4.2
Static data members says:
The declaration of a static data member in its class definition is not a definition [...]
so it must be defined, which is why you need to add:
int A::id_ = 10;
and to see this more clearly, we see that:
int A::id_ ;
is sufficient, we don't have to initialize A::id_
just define it.
You may also want to read this previous thread: What is the difference between a definition and a declaration?.
As Steve points out when you move to using header files you will need to define your variable in the cpp file since you do not want more than one definition.