Re: A loop with C struct
From: Barry Schwarz (schwarzb_at_deloz.net)
Date: 10/31/04
- Next message: Barry Schwarz: "Re: A loop with C struct"
- Previous message: Barry Schwarz: "Re: Linkst List and Pointer Problem"
- In reply to: Ronen Kfir: "Re: A loop with C struct"
- Next in thread: Barry Schwarz: "Re: A loop with C struct"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Oct 2004 16:07:38 -0700
On 23 Oct 2004 12:34:38 -0700, ronenk@tauex.tau.ac.il (Ronen Kfir)
wrote:
>Thank you all!
>solve it with:
>
>while (fread(crnt, size, 1, FPcrnt))
> {
> rewind(FPprev);
> while (fread(prev, size, 1, FPprev))
> {
> for (j=0;j<TOTAL_PRLMNT_MBR;j++)
>
> {
> fread (prev, size, 1, FPprev);
> fread (crnt, size, 1, FPcrnt);
> if (crnt->ID!=prev->ID)
> fwrite (crnt, size, 1, FPNewMbr);
> }
>
> }
> }
This could not have possibly solved your problem as it causes you to
read more blocks from crnt than you wrote to it originally. See my
response to your previous post for a discussion of the real error.
<<Remove the del for email>>
- Next message: Barry Schwarz: "Re: A loop with C struct"
- Previous message: Barry Schwarz: "Re: Linkst List and Pointer Problem"
- In reply to: Ronen Kfir: "Re: A loop with C struct"
- Next in thread: Barry Schwarz: "Re: A loop with C struct"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]