Ok, Hi, thanks for reading my code. Ok this Function its suppose to calculate the power by 2 or the square root of a value, depending of the entry code.
As you can see, its part of the definition
cout << "\n\n\tEntre el codigo de entrada:";
cin >> code;
miFunA.setCodigo(code);
cout << "\n\n\tEntra el valor a calcular:";
cin >> valor;
miFunA.setValorReal(valor);
cout << "\n\n\t El resultado es:";
miFunA.calculo(valor);
You input the code, the value to calculate and the object will call the calculo function, displaying: El resultado es: . depending of the entry code and value should be a result but its not showing the result as you see:
EDIT: Ok, this is Ironic! I myself, when I post this here, I get the point, that I wasn't doing this:
cout << "\n\n\t El resultado es:" << miFunA.calculo(valor) << endl;
Now they show! OMG!
My bad! Thanks by the way!
Pleas don't delete this post in case of me getting crazy and on need of professional assistance.
Thanks!
That image is way too small...anyway, I think the problem is you are passing it the float "val" but you are using a different value when computing the root/square. You are also not outputting the value at all, you need cout << in front of miFunA.calculo(valor);