I have been stuck on extraction overloading for hours now and the error code i get is "All paths through this function will call itself" if that helps!
1 2 3 4 5
istream& operator>>( istream& is, const Measurement& content){
is >> content.feet >> content.inch;
return is;
}
This is my extraction overload header and I have two private variable 'feet' and 'inch' of type int.
Also, your copy constructor shouldn't be there: best practice is to not write special member functions yourself unless they are required; they are only required when the class directly manages a resource - memory, for example. This is called the rule of zero: http://en.cppreference.com/w/cpp/language/rule_of_three
const means that it's an object that cannot be modified after being initially set. You're trying to put information into content.feet and content.inch, which are part of your content object; this cannot be done if content is const.