2 ms·
I think you're missing the point entirely here. C++ has to run code before main if a ctor is in a class that's static. There's no other way to initialize that
by bb88 9y ago
I think you're missing the point entirely here.
C++ has to run code before main if a ctor is in a class that's static. There's no other way to initialize that static object.
C prevents this by requiring static storage to be initialized with constants.
- pjmlp 9y agoFair enough.