Yeah, I know that's what I need to do now but I don't know where to start. I have read through these forums on the subject as well. Thanks for the links though. Is it possible if someone could give me an example within my code and maybe I can go from there?
Thank you very much. So, when you supplied those constructors and operators, now would my next step would be to formulate a code on how to add/subtract/multiply/as well as - (unary) the complex numbers?
1) operator== should return bool, so sigature would be booloperator==(const Complex&, const Complex&)
2) It just calling itself now. Think, how do you decide that two complex numbers are equal and implement it in code (Hint: you will need access to cimplex internal, so you should declare it friend, as with operator<<)
Thanks for your advice, its just I'm getting more confused the more I think about it. Do you think you can tell me what lines like I need to delete and which are my member functions?
I'm guessing the +,-,etc. are my member functions and the += and -=, etc. are the global comparison operators.
Again, I haven't taken a class yet, I'm teaching myself at the moment, sorry if I sound like I don't know anything at all. It's just I've been at this example for hours . At this point, I wish I could just look at the solution code to teach myself, but the book doesn't provide solutions for even numbers and the more I read into these new codes and variables and what not, the more confused I am...
1) lines 48- 50 have no effect: there is return before them. You should remove excess code.
2) You cannot have friend definition inside class, only declaration. Move operator << definition outside class as you did there http://www.cplusplus.com/forum/general/112890/#msg617097 .
3) To give operator access to class internals you can use friend declaration. Look how it was done in case of operator<< and add similar declaration adapted to your class.