Visual Studio Error

Getting Error: Expression must have a (pointer-to-) function type. Its in the last function.

#include <iostream>
#include <fstream>
using namespace std;

void ProcessEdges();
bool isValid();
double area();

int main()
{
void ProcessEdges();
double area();
bool isValid();

system("pause");
return 0;
}

void ProcessEdges(ifstream& in_stream, ofstream& out_stream)
{
ifstream in_stream;
ofstream out_stream;

in_stream.open("edges.txt");
out_stream.open("area.txt");

int a, b, c;
in_stream >> a >> b >> c;

in_stream.close();
out_stream.close();
}

bool isValid(int a,int b,int c)
{
double sum;
sum = a + b;
if(sum>=c)
{
cout << sum << endl;
}
else if (sum<c)
{
cout << "*" << endl;
}
return 0;
}

double area(int a, int b, int c)
{
double sarea;
int s = ((a+b+c)/2);

sarea = sqrt ((s(s-a)(s-b)(s-c))); //Error is where the first 's' is
return sarea;
}


I need a little help. Im not done with my assignment. Just want to know how to fix this error.
Last edited on
C++ doesn't assume multiplication like algebra does.

If you want to multiply, you need to use the * symbol:

 
s * (s-a) * (s-b) * (s-c)
thanks so much, that really help
Topic archived. No new replies allowed.