lundi 25 juillet 2016

Error: member reference base type 'int' is not a structure or union

Error: member reference base type 'int' is not a structure or union I've looked at the other questions and their responses but I have yet to solve my problem. This is the code where the problem keeps showing up and I have no idea how to solve it. Thanks

fraction fraction::multipliedBy(fraction f2)
{
    fraction result;
    resulti.set(f1.multipliedBy(f2)); // right here
    return result;
}
fraction fraction::dividedBy(fraction f2)
{
    fraction result;
    result.set(f1.dividedBy(f2)); // here
    return result;
}

fraction fraction::addedTo(fraction f2)
{
    fraction result;
    result.set(f1.addedTo(f2)); // here
    return result;
}

fraction fraction::subtract(fraction f2)
{
    fraction result;
    result.set(f1.subtract(f2)); // and here
    return result;
}

Aucun commentaire:

Enregistrer un commentaire