# How I restrict user from giving more input?

**URL:** https://forum.kirupa.com/t/how-i-restrict-user-from-giving-more-input/316789
**Category:** Uncategorized
**Created:** [December 2, 2010, 2:16pm UTC](https://forum.kirupa.com/t/how-i-restrict-user-from-giving-more-input/316789 "2010-12-02T14:16:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dann123](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@dann123](https://forum.kirupa.com/u/dann123)
#### Post date: [December 2, 2010, 2:16pm UTC](https://forum.kirupa.com/t/how-i-restrict-user-from-giving-more-input/316789/1 "2010-12-02T14:16:17Z")

</div>

When I ask the user to give input using cin method, sometimes user give more than required number of input using spaces ☹ and my program will halt/doesn’t work !  
How do I stop the user from giving extra input ?  
or how do I flush the extra inputs ?
