Author Topic: scanf problem  (Read 3166 times)

rob0323

  • Guest
scanf problem
« on: October 22, 2004, 06:57:55 AM »
Hello everyone.

I'm writing a asm program that calls scanf.  However, it is doesn't want to accept the 1st return and as a result automatically populates the second string field with the value before the 2nd return.  

ie.

enter name      // prompt
rob            <-- here's the 1st return
robAgain    <-- 2nd return

hi rob                // prints out my name
enter lastname  // prompt
smith
hello Mr. robAgain

I guess the buffer is not being flushed?

If someone knows what's going on and can point me in the right direction, I'd appreciate it.

Thanks for the time.

rob0323

  • Guest
Re: scanf problem
« Reply #1 on: October 22, 2004, 04:07:31 PM »
nevermind, I figured it out.  thanks anyway