|
-
Sep 13th, 2001, 07:30 PM
#1
Thread Starter
Addicted Member
overflowing a char
Simple one I think...
I am reading data in from the keyboard and at one point I want the user to input a single char, now if the user provides "AAA" instead of just 'A' the second and third A gets pushed into the next variable when I try and read it in Any idea how to just drop off the extra junk after the first letter?
I have tried cin.ignore() but that will only chop off one character...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|