is a design feature. It of itself does not generate code. It is there to tell the compiler what the class looks like.
If it worked the way that you expected - what would happen if that class was declared in a header file and that header file was #included in 10 .cpp files.
Then int var will be defined/created 10 times - this is a redefinition error.
So for static class variables it is up to you (the programmer) to define (create if you will) and initialize each class static variable once and once only somewhere outside the class block (and not in the header file - otherwise you will still have the multiple redefinition problem)