I am trying to use class to create a program, that with user input, can perform the operations of the Pythagorean theorum, but i get this error:
Error (active) E0304 no instance of overloaded function "getline" matches the argument list
This is my code:
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
class PythagoreanTheorum
{
public:
double a;
double b;
double c;
void seta(double A)
{
a = A;
}
void setb(double B)
{
b = B;
}
void setc(double C)
{
c = C;
}
double calcAreea()
{
return a * pow(a, 2) + b * pow(b, 2) == c * pow(c, 2);
}
};
int main()
{
//Define one right triangles
PythagoreanTheorum righttriangle1;
double a;
double b;
double c;
cout << "Enter the value for a: " << endl;
righttriangle1.a = getline(cin, a);
cout << "Enter the value for b: " << endl;
righttriangle1.b = getline(cin, b);
cout << "Enter the value for c: " << endl;
righttriangle1.c = getline(cin, c);
}