Sorry for pulling this back up after 10 days, but the error is still bugging me. My teacher never responded on my help over the compile error. This is what I get when I compile it.
Ch 13 Number 7.obj : error LNK2019: unresolved external symbol "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class complexType const &)" (??5@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV01@ABVcomplexType@@@Z) referenced in function _main
C:\Users\....\documents\visual studio 2010\Projects\Ch 13 Number 7\Debug\Ch 13 Number 7.exe : fatal error LNK1120: 1 unresolved externals
Maybe because you are declaring on line 10 two objects but with no parameter if you look at your class you don't have a complexType() or complexType( void ) which you are trying to call.
Lin 11: friend istream& operator>>(istream&, const complexType&);
The input stream is going to write into the complexType so it cannot be const. Change to:
The linker error was because the prototype parameters didn't match your implementation. But don't change the implementation, change the prototype as above. If you change the implementation by adding const in front of the complexType parameter it shouldn't compile because the compiler will not allow you to modify complex.realPart and complex.imaginaryPart.