Cin.peek() Help

"So, to enter the point (3,-4), the user should be able to enter any of: (3,-4), 3,-4), (3,-4, (3 -4), 3,-4, 3 -4), (3 -4, or even 3 -4."

My teacher told us to use the cin.peek() function to approach this problem but i cant find any resources that help with this topic.
Check out http://www.cplusplus.com/reference/istream/istream/peek/

I suspect your teacher recommended using cin.peek() to determine if the next character will be a symbol (like a parenthesis) or a digit. Once you know the type, extract it to the appropriate char or number variable via cin >> or cin.get()
That is what i am trying to do. The tutorials dont really help me. Can you give a simple example that uses cin.peek()..
Topic archived. No new replies allowed.