Originally Posted by
grumpy
Defining statics (which is what you are incorrectly referring to as "instantiation" or "initialization") in a header file is bad practice more often than not.
If the header file is #include'd by more than one source file, then the definition of that static member usually needs to be in a separate source file. Otherwise, the one-definition rule is violated. Practically that usually results in a linker error, without creating an executable.
There are some tricks that allow you to get away with placing the definition of a class static in a header file, but they usually involve coercing the compiler to create a definition in only one object file. Compilers don't do that by default.
If the header file is only #include'd by one source file, it makes no difference. However, the purpose of placing declarations in a header file is usually to allow those declarations to be used by more than one distinct source file.