0

No it's not. The system in our education gives the teacher the free will to do whatever he may see as good to go, so I think it was his choice to work with this old resources and not give us the up-to-date programming methods in C++.

Somewhat hard to believe but I take your word for it.

0

Yes you are right, in general depending on the compiler and the error, sometimes the error message points you straight to the line that needs fixing, sometimes not. If not, then there are error(s) preceding the offending line.

The problem that there is, is that the function definition ends with a semicolon and that is plain wrong. Function declarations/prototypes need to end with a semicolon but definitions not. So, just remove the extra semicolon there (in this case line #12, I think).

I removed it and then what appears to me is that I have another new error that came after removing it:

Undefined symbol 'c' in function sum(int *, int *)

Then I just added the pointer 'c' in line no. 12 and everything went well! I tested the program and it's now working great.

Thanks all for your help, don't know what I would've done without your help.

Edited by endframe: n/a

0

Somewhat hard to believe but I take your word for it.

I think it's the reasonable explanation ; cuz that explains when somebody take the same course but with another teacher, he'll see a whole lot of changes in everything.

0

This:

#
void sum( int *a, int *b, int *c);
#
{

should be this (no ";"):

#
void sum( int *a, int *b, int *c)
#
{

0

Sorry... I didn't notice that there were more pages -- I'm new to DaniWeb.

Ignore my previous.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.