My professor yelled at me last time I asked him for help so I haven't really had the opportunity to ask anyone for help ANY input is appreciated. |
Ha ha! Looking at your code I can see why.
(Of course, I'm on your side. A
good professor will have an almost infinite amount of patience.)
Back to your code, it is pretty bad. Is this below what you call an
if() structure?
You forget to put the parentheses around the condition.
Then you mess up the curly braces.
Then you forget about the semicolon, mandatory at the end of an instruction.
25 26 27 28 29 30 31 32
|
if ten_numberarray[i]>0
{
sumfunction(ten_numberarray, size_1)
else
sumfunction_neg(ten_numberarray,size_2)
}
|
1 2 3 4 5 6 7 8
|
if (ten_numberarray[i] > 0)
{
sumfunction(ten_numberarray, size_1);
}
else
{
sumfunction_neg(ten_numberarray,size_2);
}
|
Later on, you do this:
result=sumfunction_pos+sumfunction_neg;
Since the two "sumfunctions" are functions, you must call them as such. After their name you must append parentheses. And if the functions need to be passed arguments, you give those arguments in the parentheses.
result = sumfunction_pos(arg1, arg2) + sumfunction_neg(arg3, arg4);
There are more things wrong here and there, but honestly I feel I'd be wasting both my time and yours by pointing them out.
So my suggestion now is this: read this site's C++ tutorial, and rewrite your program from scratch. This will take a fair amount of time and effort, so hopefully you're not pressured by some deadline that's near.
http://www.cplusplus.com/doc/tutorial/