0

please fgets function how to read int ?

and one more question scanf how to like fgets press enter then continue next step?

thanks!

user531119
  • 55
  • 1
  • 2
  • 3
  • 1
    How is this `int` represented in whatever file you're trying to read? (Show us an example: is this simple text, or something more complex?). `scanf` will, like `fgets`, wait for the user to press enter, if you're reading from `stdin` (and you've not modified it otherwise). – Thanatos Dec 07 '10 at 08:07

1 Answers1

1

If you use fgets, you would need to use sscanf() after that to read integers.

Shamim Hafiz - MSFT
  • 21,454
  • 43
  • 116
  • 176