LongInt i1;
cin >> i1;
where LongInt is a class that contains a stack of integers. I want to store the input into the stack in the class and I assume that means I have to overload the >> operator in my class file. The problem is that I’m not sure how to push inputs like cin >> “111343241” into a stack digit by digit. How would I make this work?
To overload the operator itself, implementing the get loop, define a namespace-scope
How you push single digits to the LongInt depends on your implementation of LongInt.