The following 3 code blocks are the main.cpp, static_class_array.cpp, and static_class_array.h respectively. I'm getting the following error:
static_class_array.cpp||In constructor 'static_array_class::static_array_class()':| static_class_array.cpp|5|error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment| ||=== Build finished: 1 errors, 0 warnings ===| #include "static_class_array.h" int main() { static_array_class* array_class; array_class = new static_array_class(); delete array_class; return 0; } #include "static_class_array.h" static_array_class::static_array_class() { static_array_class::array[3] = {0,1,2}; } static_array_class::~static_array_class(){} #ifndef STATIC_CLASS_ARRAY_H #define STATIC_CLASS_ARRAY_H class static_array_class { private: static int array[3]; public: static_array_class(); ~static_array_class(); }; #endif