Thread: fputc(0x0A,file)

  1. #1
    Unregistered
    Guest

    fputc(0x0A,file)

    On windows, how can I write the (multi)char 0x0A (which is \n)
    without getting 0x0D 0x0A but only 0x0A eg 10 decimal ?

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    129
    If 0x0D is what I think it is - carriage return - try opening the file in binary mode.

  3. #3
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    If fputc( 10, fptr ); does not work (and I suspect it will), this may be a 'feature' of the OS. Try your question on the Windows forum; I'll bet those guys will know the answer.
    Jason Deckard

Popular pages Recent additions subscribe to a feed