The line const double Shape::pi = 3.14159265; should be in your Shape.cpp file. The header file is for declaring the variables. You can only define a variable once, therefore it must be done in the .cpp. The header file says how to use these variables and functions, the cpp file says what to do.