Like Tree1Likes
  • 1 Post By rags_to_riches

Help with fread

This is a discussion on Help with fread within the C++ Programming forums, part of the General Programming Boards category; Code: mystring_reply = fread(buffer,1,file_size,infile); the code above is sending a size_t value to mystring_reply and im looking to get a ...

  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    9

    Help with fread

    Code:
    mystring_reply = fread(buffer,1,file_size,infile);
    the code above is sending a size_t value to mystring_reply and im looking to get a character array out of it. this is homework from a tutor and I am suppose to ask on forums like this when im confused so here I am! thanks!

    btw im sticking to c code in this lesson, as would be the reason im not using cin/cout. if someone could explain to me how to do this right that would be great!

  2. #2
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,655
    So if you're "sticking to C code", why did you ask this in the C++ forum?

    The character array is in buffer. fread(3): binary stream input/output - Linux man page
    Elysia likes this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fread() questions.
    By gp364481 in forum C Programming
    Replies: 2
    Last Post: 02-06-2009, 12:32 AM
  2. fread
    By dyn4sty22 in forum C Programming
    Replies: 10
    Last Post: 03-27-2008, 03:36 PM
  3. a lil' help using fread()
    By wuzzo87 in forum C Programming
    Replies: 8
    Last Post: 10-06-2007, 04:52 AM
  4. fread: Bus error
    By fnoyan in forum Linux Programming
    Replies: 4
    Last Post: 08-20-2004, 11:30 AM
  5. New to fread()
    By elfjuice in forum C++ Programming
    Replies: 10
    Last Post: 06-22-2002, 03:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21