Thread: C and C++ question about writing to a file

  1. #1
    Registered User
    Join Date
    Aug 2016
    Posts
    3

    Question C and C++ question about writing to a file

    Hi, I hope I can make a request here -

    I am looking for 4 examples please: The simplest way to do this

    In C

    1. write an array of 1024 chars to file (all 0s)

    2. read the same array from the file

    The file should be binary, not text.

    In C++, how to do the same thing the C++ way.

    3. ...

    4. ...

  2. #2
    Registered User
    Join Date
    Aug 2016
    Posts
    3
    I am looking at the example here on the website, but I'm a little confused about an array.

    ...beginner

  3. #3
    Registered User
    Join Date
    Aug 2016
    Posts
    3
    I solved the problem by reading the File IO example here on cprogramming.com. I looked through it too quickly. Sorry for the unnecessary post.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 09-01-2014, 08:14 AM
  2. Replies: 16
    Last Post: 04-20-2009, 04:33 PM
  3. File reading/writing question
    By Rider in forum C++ Programming
    Replies: 26
    Last Post: 12-23-2006, 05:27 AM
  4. Replies: 3
    Last Post: 11-21-2006, 07:26 PM
  5. reading from file and writing in a nother file
    By undisputed007 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2004, 02:17 PM

Tags for this Thread