|
-
Sep 26th, 2002, 09:34 PM
#1
Thread Starter
Member
easy *hopes* cin question
Hey,
I've been looking all over for this, but is there a way to cin an integer and ignore any other symbols i enter before or after it?
Like for ex:
int a,b;
cin >>a >>b;
if I enter "(3,4)". a is not 3, and b is not 4. Is there some kind of flag to set cin to only accept integers.
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
|