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

  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,897
    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, 06:57 AM
  2. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  3. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  4. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10: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, 01:27 PM