#1
  1. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    12

    Passing file pointer in functions


    I declare my file pointer like this FILE *fp;, this is the function prototype, int TAGExists(FILE fp);.. and in the body of the function I am using it like this: fseek(&fp,-128,SEEK_END); .. what is wrong with this? I get errors about FILE to FILE* convertion.
  2. #2
  3. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    12
    er! I fixed it, I had to pass the address and accept a pointer on the function. sry!

IMN logo majestic logo threadwatch logo seochat tools logo