my intro computer science class just covered functions this week and after checking the major thread for "Unresolved external symbols" I think it is either
a) You declared the functions but never called them after main
b) You are missing the correct library
I'm just not sure which one it is or how to correctly go about it. Also, I think my logic is slightly flawed in the calcSideC block although Im not sure
#include <iostream>
#include <cmath>
using namespace std;
float getSide();
float calcSideC(float sideA, float sideB, float total);
void displaySideC(float sideC);
int main()
{
{
float sideA = 0.0;
float sideB = 0.0;
float total = sideA + sideB;
float sideC = sqrt(total);
sideA = getSide();
sideB = getSide();
sideC = calcSideC(sideA, sideB, total);
displaySideC(sideC);
return 0;
}
float getSide();
{
float sideA;
cout << "Enter two sides of a right triangle.\n\n" << "Side A: \n" << "Please enter the dimension: ";
cin >> sideA;
return sideA;
}
float getSide();
{
float sideB;
cout << "\n\n" << "Side B: \n" << "Please enter the dimension: ";
cin >> sideB;
return sideB;
}
float calcSideC(float sideA, float sideB, float total);
{
float sideA;
float sideB;
float total;
float sideC;
pow(sideA, 2);
pow(sideB, 2);
float sqrt(total);
return sideC;
}
void displaySideC(float sideC);
{
float sideC;
cout << "The dimension of Side C is: " << sideC;
}
system("pause");
return 0;
}