Hello I'm new to c++ I'm taking classes at high school here is the code i need help with
Code:
#include <iostream>
using namespace std;
int sumofthree(int a,int b, int c);
double LinearFunction(double m, int b, int x);
int getCharacter(int a);
void theFunctionofNoReturn();
double distance(int x1,int y1,int x2, int y2);
int main()
{
cout << sumofthree(3,5,2)<<endl;
cout << LinearFunction(1,2,3)<<endl;
cout << getCharacter(9)<<endl;
theFunctionofNoReturn();
cout << distance(int x1=5,int y1=5,int x2=10, int y2=10)<<endl;
}
int sumofthree(int a, int b, int c)
{
return (a+b+c);
}
double LinearFunction(double m, int b, int x)
{
return (m*x+b);
}
int getCharacter(int a)
{
return(a=65);
}
void theFunctionofNoReturn()
{
cout<< "*********************" <<endl;
cout<< "* NO RETURN *" <<endl;
cout<< "*********************" <<endl;
}
double distance()
{
return(int x1,int y1)-(int x2,int y2);
}
ok and here is the error i get when i click build and run
Code:
||In function 'int main()':|
|23|error: expected primary-expression before 'int'|
|23|error: expected primary-expression before 'int'|
|23|error: expected primary-expression before 'int'|
|23|error: expected primary-expression before 'int'|
||In function 'double distance()':|
|54|error: expected primary-expression before 'int'|
|54|error: expected ')' before 'int'|
||=== Build finished: 6 errors, 0 warnings ===|
HELP me tell me whats wrong i need help its due tommorow
Ok im down to 2 errors the one after in function 'double distance()'