# Problem...

• 04-23-2003
Aakash Datt
Problem...
I'm trying to compile this program and it gives me the following errors:

mp.obj : error LNK2001: unresolved external symbol "public: void __thiscall Fraction::reduce(int,int)" (?reduce@Fraction@@QAEXHH@Z)

imp.obj : error LNK2001: unresolved external symbol "public: struct fraction __thiscall Fraction::Divide(struct fraction,struct fraction)" (?Divide@Fraction@@QAE?AUfraction@@U2@0@Z)

imp.obj : error LNK2001: unresolved external symbol "public: struct fraction __thiscall Fraction::Multiply(struct fraction,struct fraction)" (?Multiply@Fraction@@QAE?AUfraction@@U2@0@Z)

imp.obj : error LNK2001: unresolved external symbol "public: struct fraction __thiscall Fraction::Subtract(struct fraction,struct fraction)" (?Subtract@Fraction@@QAE?AUfraction@@U2@0@Z)

imp.obj : error LNK2001: unresolved external symbol "public: struct fraction __thiscall Fraction::Add(struct fraction,struct fraction)" (?Add@Fraction@@QAE?AUfraction@@U2@0@Z)
Debug/Fraction.exe : fatal error LNK1120: 5 unresolved externals

Can someone tell me what they mean?
• 04-23-2003
XSquared
That means that it can't find the actual code for those functions.
• 04-23-2003
Jamsan
post some code ...
• 04-23-2003
Aakash Datt
• 04-23-2003
Jamsan
Code:

`Fraction:: Add (fraction a, fraction b)`
thats your first problem....you have the function Add of class Fraction, but you forgot what it returns....it returns a type fraction (your structure), so throw that in there ..... fraction Fraction :: Add (....)

2nd,

Code:

`fraction Multiply (fraction a, fraction b)`
you have that....now you have what it returns, but forgot it was part of the class Fraction ....fraction Fraction :: Multiply (....)

you did both of those more than once, so fix those 2 problems, and you should be all set.
• 04-23-2003
Aakash
....
Not quite...I'm not getting even more errors...72....
• 04-23-2003
Perspective
Re: ....
Quote:

Originally posted by Aakash
Not quite...I'm not getting even more errors...72....
care to share the errors/revised code or should i read your mind....
• 04-23-2003
Jamsan
well I hope your not running it with IMPLEMENTATION: and CLIENT: in there....post your updated code ...
• 04-23-2003
Aakash Datt
nevermind
It's working properly now.

Thanks go to XSquared, Jamsan, and Perspective.