Thread: Writting hex value into files

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    It's probably just the modes again. In binary mode you are supposed to rely exclusively on read() and write(). The other method that Swarvey mentioned works for text mode.

  2. #2
    Registered User
    Join Date
    Jul 2010
    Posts
    56
    It's probably just the modes again. In binary mode you are supposed to rely exclusively on read() and write(). The other method that Swarvey mentioned works for text mode.
    rely on read() and write()?
    i tried it and the compiler reports error message.

    Code:
            myFile.write(0xFF,1);
    error: invalid conversion from `int' to `const char*'|

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 07:53 AM
  2. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  4. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM
  5. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM