Pre C++17
In traditional C++, if you have a class that has a static array as data member, you have to initialise that array outside of the class.
class myclass {
protected:
static uint myarray[4];
};
uint myclass::myarray[4];
You will typically have the declaration in your header file, and the definition (initialisation) in a cpp file.
Since C++17
With modern C++, you can do all in the above in the class declaration, with inline:
class myclass {
private:
inline static uint myarray[4] = {};
};
The generated code is the same.
Thank you for reading.