This may be silly, but you are instantiating an object of type BarPlot and then invoking the plotBar method on that instance, correct? That is, you're using it as follows:

BarPlot bp;...