If it can be static, you can initialize it in your .cpp file. Add the static keyword to the class declaration:
class Cal { private: static int wa[2][2]; public: void do_cal(); };
and in the file area in the .cpp file add:
#include "Cal.h" int Cal::wa[2][2] = { {5,2}, {7,9} }; void Cal::do_cal() { print(wa)
If you never change it, this will work well (along with creating a const). However, you only get one that is shared with every instance of your class.
Rob k source share