So for my Intro C++ class I have to do an assignment using inheritance where there are 3 classes; Package, TwoDayPackage, and OvernightPackage. The latter two inherit from Package. So I have a couple of errors in my program, but I think they all stem from the C2011 error.
The error occurs at line 3. I thought maybe there was some premade C++ class or type named Package so I changed the name to PackAge and then to ShipPackage but that didn't help at all.
If it matters at all the other two classes override the calculateCost() function, and the both get error C2504, that the base class is undefined.
I don't see it. The only probable way I can think of that could be causing this is if the class was defined inside a header (e.g. "package.h") and you were doing this in a source:
1 2
#include "package.h"
#include "package.h"
By the way, next time post the error message, not the error code. Believe it or not, most people don't have Microsoft's compiler error codes memorized.
Also what do you mean by post the error message, not just the error code? For error C2011, I posted what Visual Studio 2010 said in the description as the title of the post. And for C2506, I just paraphrased the description.