>I wrote what I could in my program but now I'm stuck.
You don't have any problems that a good book on C++ and a compiler wouldn't solve.
>double main()
I don't see this often. Usually the return type is either void or not present. I'll say this once, very clearly for you:
//Headers
int main()
{
// Program here
} Anything else is wrong.
>exit(1);
1 isn't a portable return value. You've already included , so you might as well use EXIT_FAILURE.
>i=0;
>while (i<5)
>in_stream>>x_1>>y_1>>x_2>>y_2>>x_3>>y_3;
This is suspicious. What it does is read these values until one of the attempts fails. If you have several lines of points then you will only process the last of them. When a loop has a single statement you can omit braces, otherwise you need a compound statement:
while ( condition )
simple statement;
or
while ( condition ) {
simple statement;
simple statement;
...
} >out_stream<<"The area of the points in project3_1.dat is\n"
><<(a= sqrt(pow(x_1-x_2,2)+pow(y_1-y_2,2)));
>b= sqrt(pow(x_2-x_3,2)+pow(y_2-y_3,2));
>c= sqrt(pow(x_3-x_1,2)+pow(y_3-y_1,2));
You realize you're only printing a, yes?
>if (area>0)
area might be greater than 0, but it might not. At this point you haven't given area a value, so this test introduces undefined behavior.
>double triangle_area (double a, double b, double c)
Function definitions cannot be nested inside of other function definitions.
>i=i+1;
Not only does this serve no purpose at all, i is uninitialized, so yet again you have undefined behavior.
>in_stream.;close();
>out_stream;.close();
I have no suggestions for how this could have happened. There's no ;. or .; operator, and if you had bothered to read a book on C++ before whipping out Notepad and typing gibberish, you would have known that.
>return,
Semicolons end a statement, but even then this would be illegal because you defined main to return double and you say you're returning nothing. The three standard return values for main are all int: 0, EXIT_SUCCESS, and EXIT_FAILURE. 0 and EXIT_SUCCESS mean the same thing.