Looking for a library function!!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hans

    Looking for a library function!!

    Hi all,
    Is anyone aware of any existing library functions that directly read
    only a fixed number of bytes?? I dont wanna use scanf or put getchar()
    in a loop.. any other suggestions???
    Thanks in advance,
    Hans.

  • Ian Collins

    #2
    Re: Looking for a library function!!

    Hans wrote:
    Hi all,
    Is anyone aware of any existing library functions that directly read
    only a fixed number of bytes?? I dont wanna use scanf or put getchar()
    in a loop.. any other suggestions???
    fread()

    --
    Ian Collins.

    Comment

    • zhao.kaiyong@gmail.com

      #3
      Re: Looking for a library function!!


      Hans wrote:
      Hi all,
      Is anyone aware of any existing library functions that directly read
      only a fixed number of bytes?? I dont wanna use scanf or put getchar()
      in a loop.. any other suggestions???
      Thanks in advance,
      Hans.
      open file by bit style, and fread();

      Comment

      • Flash Gordon

        #4
        Re: Looking for a library function!!

        Hans wrote:
        Hi all,
        Is anyone aware of any existing library functions that directly read
        only a fixed number of bytes?? I dont wanna use scanf or put getchar()
        in a loop.. any other suggestions???
        I'm sure lots of people are aware of such functions. What you are
        looking for is probably fread. As always, read your text book and check
        the return value when using it.
        --
        Flash Gordon
        Sigless on this computer.

        Comment

        • Herbert Rosenau

          #5
          Re: Looking for a library function!!

          On Wed, 9 Aug 2006 04:48:45 UTC, "Hans" <hans.krafka@gm ail.comwrote:
          Hi all,
          Is anyone aware of any existing library functions that directly read
          only a fixed number of bytes?? I dont wanna use scanf or put getchar()
          in a loop.. any other suggestions???
          Thanks in advance,
          Hans.
          >
          fread().

          Or use simply getc() or getchar() to read byte after byte.

          --
          Tschau/Bye
          Herbert

          Visit http://www.ecomstation.de the home of german eComStation
          eComStation 1.2 Deutsch ist da!

          Comment

          Working...