CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    103

    (byte)4 stands for eof???

    I saw a old post and I have tried it. It does work, but I couldn't understand it well.
    I use it as follow:
    RandomAccessFile raf;
    ...
    raf.write((byte)4);
    ...

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125
    While Ctrl-Z (26) is the most common EOF marker in PC land (Dos/Windows) and Mani Mini computers. Ctrl-D (4) is the most common in the Unix world.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Jan 2003
    Posts
    103
    If it's for Unix, why oould I use it in Windows?

  4. #4
    Join Date
    Jan 2002
    Location
    Halifax, NS, Canada
    Posts
    985
    TheCPUWizard probably didn't know what Platform you were using.

  5. #5
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125
    That plus some programs that have a unix history or bias (e.g. some Java implementations...) still use ctrl-D.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured