Thread: Read binary file to wchar_t buffer

  1. #1
    Registered User
    Join Date
    Jan 2019
    Posts
    1

    Read binary file to wchar_t buffer

    I have a binary file that I want to read to wchar_t buffer .

    For example, if the binary is :0xaa, 0xbb,0xcc

    I want that wchar_t buffer will be 00aa,00bb,00cc.

    How can I do it please with c on Windows?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,181
    What is your idea and what have you tried?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Read 32 Bits From Any File Into Buffer
    By fuzzymanboy in forum C Programming
    Replies: 3
    Last Post: 10-05-2017, 10:12 PM
  2. Reading a binary file into a buffer including nulls
    By mckeon04 in forum C Programming
    Replies: 8
    Last Post: 09-25-2012, 02:38 PM
  3. Reading a binary file into a buffer including nulls
    By mckeon04 in forum C++ Programming
    Replies: 8
    Last Post: 09-25-2012, 02:38 PM
  4. dump the buffer read from binary file
    By r00t in forum C Programming
    Replies: 23
    Last Post: 11-23-2009, 11:51 PM
  5. Replies: 7
    Last Post: 04-27-2009, 05:56 PM

Tags for this Thread