View Single Post
  #54   Spotlight this post!  
Unread 07-06-2002, 23:21
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
after you've done the cin.rdbuf( )->in_avail( ), you must actually read in a byte. a simple 'cin>>myChar' should do nicely. the problem is, in_avail() on checks to see if data is there, it doesn't clear it from the buffer. Therefore, that same data will be there the next time and you will always get 0 back. If you're already doing this, post the offending code and I'll take a look at it.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php