Compare and contrast:
>double findarea (double,double);
>d=findarea(a,b);
>double findarea (double q,double r,double s) {
Be sure to take careful note that the declaration takes two arguments and the definition takes three. C++ treats these as two unique functions that are overloaded to have the same name, therefore the linker is complaining about your not defining the findarea that takes two arguments.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>I had a feeling it was something simple I was overlooking.
That's not really something simple, so don't feel bad. :) Function overloading problems tend to be incredibly subtle and difficult to find, even for experienced C++ programmers.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401