List l; l >>= 34; l >>= 48; l >>= 23; l <<= 12; l <<= 3;is equivalent to
List l; l.insert_at_back(34); l.insert_at_back(48); l.insert_at_back(23); l.insert_at_front(12); l.insert_at_front(3);Your operator method should return a reference to the modified List object, and should take a single parameter which is an int. Test your code to make sure it works.
As an aside, the << and >> operators usually correspond to left and right shifts (bitwise). For integers, a left shift corresponds to multiplying by 2 and a right shift corresponds to dividing by 2. So then
int i = 7; i <<= 3; // Corresponds to i = i << 3; cout << i << endl;would output 56. Notice that here we have overloaded the <<= and >>= operators for List to mean what we want them to mean, in this case, adding an element to the front or back of the list. Similarly, the ostream class overloads the << operator for output, and the istream class overloads the >> operator for input.
Rational(); Rational(const Rational &o); Rational(const long &o); Rational(const double &o);Overload the appropriate operators to make the class easy to use, namely: =, +, - (subtraction), - (negation), *, /, ==, !=, <, >, <=, >=, !, +=, -=, *=, /=, bool, long, double, <<, >>