I typed this book program that addresses classes and gave error. How to solve?
#include <iostream>
using namespace std;
class Efetua_calculo{
private:
double total;
double soma;
double divide;
public:
void mostra_calculo (void){
cout << "Resultado das funcoes soma() e divide() e :" << endl;
cout << soma() << endl;
cout << divide() << endl;
return;
}
};
double Efetua_calculo::soma(){
int valor1 = 2;
int valor2 = 3;
total = valor1 + valor2;
return (total);
}
double Efetua_calculo::divide(){
int valor1 = 2;
int valor2 = 3;
total = (double) valor1/valor2;
return(total);
}
int main()
{
Efetua_calculo calculo;
calulo.mostra_calculo();
return 0;
}