Corrected the overloading of << and >> by making sure the second parameter is implicitly convertible to int