In my program I have a static variable that I declared, but when I debug my program is tells me that it hasn't been initialized.
I initialized the static variable outside of the class and it looks like the example in my book, so I don't understand whats wrong.
Thanks
Code:
class HotDogStand
{
public:
HotDogStand(int standID, int dogSold);
void JustSold();
int ReturnJustSold();
static int TotalDogSold(int total);
private:
int _standID, _dogSold;
static int _totalDogSold;
};
int HotDogStand::_totalDogSold = 0;
void main()
Thanks
Comment