I have a problem on line 29
//On GLasses.cpp#include "Glasses.h"
Glasses::Glasses(){color = "unknonw";prescription = 0.0f;
}
Glasses::Glasses(string color, float prescription){setColor(color);setPrescription(prescription);}Glasses::~Glasses(void) {
// behaviorsstring Glasses::toString(void){string strPrescription = to_string(prescription);strPrescription = strPrescription.substr(0, 4);
return "Color: " + (color) + ", Prescription: " + (prescription);}
// accessors and mutatorsstring Glasses::getColor(void){return color;}void Glasses::setColor(string color){if (color.length() > 0)this -> color = color;elsethis->color = "unknown";}
float Glasses::getPrescription(void){return prescription;}void Glasses::setPrescription(float prescription){if (prescription > 0.0f)this->prescription = prescription;
elsethis->prescription = 0.0f;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here