With a quick look, the main problem I see, is nowhere do you call the functions isValid or areaofTriangle. before your if (true) You first would call isValid, then call areaofTriangle IF isValid returns true. Try fixing that, and if you're still in trouble, let it be known here. We'll see what else needs to be done.
EDIT: You may want to change the isValid header a bit. Instead of using && in the checks for the sides, use ||, meaning OR. The way you're doing the checking, ALL THREE values must be less than 0 to make it false, instead of just one. Maybe let it be <= also, since any side of 0 makes a triangle impossible.
I'm still lost. I don't think I am "calling" the functions right. Can you help with that? I added the bool function before, but I don't know if that is what calling the function is or not.
1 2 3 4 5
cout << isValid(side1, side2, side3);
if (true)
cout << "The area of the triangle is: " << areaOfTriangle << endl; // If it is a triangle, the area will be computed
elseif (false)
cout << "The input provided is not possible to calculate an area." << endl;
I made the second changes you said and I have no errors when compiling, but when I enter in the sides, I always get some weird number like 013F1091. Thanks for your help alot. Any input will be appreciated. I'm new to this.
What do you suggest I use? I used the true/false so it could know if my triangle was actually a triangle. I guess my problem is not knowing how to connect isValue into my program. I'm lost.
cout << isValid(side1, side2, side3);
if (true)
cout << "The area of the triangle is: " << areaOfTriangle << endl;
elseif (false)
cout << "The input provided is not possible to calculate an area." << endl;
to
1 2 3 4
if ( isValid(side1, side2, side3))
cout << "The area of the triangle is: " << areaOfTriangle(side1, side2, side3) << endl;
else
cout << "The input provided is not possible to calculate an area." << endl;
The value you got 013F1091 is likely the memory address of the function, you need the parenthesis and the arguments when calling a function.