I have header file in which I have static function which are public and i have a private static array. In my c++ file file i am calling my array from one of this static function and getting error "UNDEFINED REFERENCE TO abc::ARRAY". why I am getting this error? When I remove static from array and function it works properly. But I need to make them static to use in another c++ file
Asked
Active
Viewed 82 times
-3
-
2You know code is just text, and you can paste it here, right? Why do we have to look at a picture of it? – Jonathan Wakely Mar 24 '17 at 12:38
1 Answers
-1
You didn't define the array in a .cpp file:
std::array<int, 52> deck::deckArray;

Emil Laine
- 41,598
- 9
- 101
- 157