Skip to main content
added 46 characters in body
Source Link
Sarfaraz Nawaz
  • 359.1k
  • 120
  • 673
  • 855
int Tree::objectCount = 0;

The followingabove line should be outside the class, and in .cpp file, as shown below:

//Tree.cpp 
#include "Tree.h"

int Tree::objectCount = 0;

The following line should be outside the class, and in .cpp file:

//Tree.cpp 
#include "Tree.h"

int Tree::objectCount = 0;
int Tree::objectCount = 0;

The above line should be outside the class, and in .cpp file, as shown below:

//Tree.cpp 
#include "Tree.h"

int Tree::objectCount = 0;
Source Link
Sarfaraz Nawaz
  • 359.1k
  • 120
  • 673
  • 855

The following line should be outside the class, and in .cpp file:

//Tree.cpp 
#include "Tree.h"

int Tree::objectCount = 0;