I have tried to overload the overload so that I can see how many of the many items are more polynomial (e.g. - If there were 4 words of polymania 1 and 3 words in Palenomia 2, then Polyminium 1> Polyminia 2 would be correct. My polycygic objects are linked to the list, so I thought I would go to each list and make a counter variable for each. ) Have to face, the counter will be raised above 1. However, when I try this function in the main, it gives the truth for those lists which are equal in number of words.
bool polynomial:: operator> (Cost polymic and other) const {int countA; Int countB; Shared_ptr & lt; Polynomial :: Term & gt; A = this-> Head; Shared apt & lt; Polynomial :: Duration & gt; B = Other A = a- & gt; Next to {countA ++;} (b; b! = Nullptr; b = a = b-> gt; next) {countB ++;} if (countA> with UntB) {cout < & Lt; "Greater So" & lt; & Lt; Endl; Back true; } And {cout & lt; & Lt; "Less or equal" & lt; & Lt; Endl; return false; }}
Never forget the introduction :)
Int countA = 0; Int countB = 0;
No comments:
Post a Comment