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.

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.

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.

This:

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

should be this (no ";"):

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

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

Ignore my previous.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.