I'm new to C++ and still in learning phase, so this may be a simple and probably dumb question to you ;(
From other questions and answers on the board, I learned that it is customary and preferred to initialize the private static class data member in the cpp file along with the other member function definitions.
However, could it be possible to initialize the member function as global variable in main.cpp? Since all objects should share one static data member, why not just initialize it there? (I would think initializing it in main itself, but I would guess this would spit out a compilation error)
Could you please explain if this is technically not plausible or just not done conventionally. Since the static data member is initialized in class cpp file as a global variable anyways, I do not see a reason why initializing it in main cpp will fail. Please advise.