How read serial without consume byte

Hi!

I have to develop API that when arrive byte by serial communication, only consult the serial without consume byte of serial fifo.
Is it possible?

Thanks,
Depending on what class you use, it's possible. You can use putback() in istream for example:

http://www.cplusplus.com/reference/istream/istream/putback/
Topic archived. No new replies allowed.