-3

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

See my code for reference

Viral
  • 47
  • 8

1 Answers1

-1

You didn't define the array in a .cpp file:

std::array<int, 52> deck::deckArray;
Emil Laine
  • 41,598
  • 9
  • 101
  • 157