Hi, I have a problem where I get an int as input at the wrong time in my c++ program, so I need to "put it back" on cin later. However the closest thing I can find to do this is the pushback function for istreams. This sadly is only for characters and using multiple characters seems to separate them. Is there a good way to put a piece of input back on the front of cin? Thanks.
edit
The reason for this is that I am using a graph class that uses the >> operator for input, but the first piece of input has to be the number of edges. I was hoping to leave the graph class alone and just give cin the number of edges myself. So basically the only piece of input that is out of order is the first int that gets sent from cin.