The error message means that your int energySystem::getEnergyLevel()
should be made a const member function in order to be called with a const energySystem object. That is, you need the following prototype:
int energySystem::getEnergyLevel() const; //notice 'const' here.