![]() |
IOBit Software
|
|
|
||||||
| Programming Place to discuss programming including HTML, Java, C++, MySQL and others. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I've been trying to find a C++ equivalent to C's fflush(stdin), but none seem to work. cin.ignore(), cin.ignore(x), cin.ignore (x,'\n'), and cin.clear() don't work for a simple cin>>x when I input characters. It's not the attempt to convert chars to an int because I've tested and error handled that portion. I think for some reason there's still a '\n' or something floating around in the buffer that I can't seem to get rid of.
I'd prefer not to use C for the sake of consistency, but if there's no equivalent I guess I have no choice. Any ideas? Thanks! |
| Sponsored links |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mac Equivalent to DVD Decrypter and DVD Shrink Available? | kstrat | Macintosh | 1 | 11-14-06 07:25 |
| Convert .ape files to WMA or equivalent. | augiedoggie | Software | 3 | 08-03-06 18:08 |
| linux equivalent to sygate? | Tonglebeak | Linux | 3 | 04-18-06 19:51 |
| What is the AMD equivalent | Quagmire02 | Hardware | 11 | 04-14-05 13:29 |
| Free equivalent of Partition Magic | mcadam | Software | 0 | 04-06-05 11:08 |