pointer mismatch for actual parameter...What the hell is that???

This is a discussion on pointer mismatch for actual parameter...What the hell is that??? within the C Programming forums, part of the General Programming Boards category; the eror says 'fread' : pointer mismatch for actual parameter 1 this is the line of code fread ( sRec, ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    22

    Question pointer mismatch for actual parameter...What the hell is that???

    the eror says

    'fread' : pointer mismatch for actual parameter 1

    this is the line of code

    fread ( sRec, sizeof ( struct book ), (size_t)1, library );

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Hehe, is this my code that I posted earlier?
    Anyway, is sRec a pointer to a structure or an array of struct? If not then you need to use the address of operator in your call to fread.

    fread ( &sRec, sizeof ( struct book ), (size_t)1, library );

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 06-27-2009, 07:57 AM
  2. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 05:23 AM
  3. Replies: 2
    Last Post: 07-11-2008, 08:39 AM
  4. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 11:10 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM

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