Subject: Re: Need help with c! Approved: clc AT plethora DOT net References: From: "Raymond \"Ray\" Moritz" X-Newsreader: Microsoft Outlook Express 5.00.0810.800 Organization: gte.net X-Msmail-priority: Normal X-Priority: 3 X-Auth: D44787000AD1D38653D28491 Lines: 22 X-Mimeole: Produced By Microsoft MimeOLE V5.00.0810.800 Newsgroups: comp.os.msdos.djgpp,comp.lang.c.moderated Message-ID: Originator: clcm AT plethora DOT net (Comp Lang C'Moderated) Date: Mon, 18 Jan 1999 19:03:17 GMT NNTP-Posting-Host: 205.166.146.5 X-Trace: ptah.visi.com 916686197 205.166.146.5 (Mon, 18 Jan 1999 13:03:17 CDT) NNTP-Posting-Date: Mon, 18 Jan 1999 13:03:17 CDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com First, I suggest putting a more descriptive subject on your posts. Mohanaraj Gopala Krishnan wrote in message news:clcm-19990117-0010 AT plethora DOT net... >fscanf(fptr,"%d",*(pages_done++)); pages_done is a pointer to an integer. So *(pages_done++) is an integer. fscanf needs the address (pointer) of the memory to write to, not a value. Change this to just pages_done++. >fprintf(fptr,"%d",*(pages_done++)); Note the difference. fprintf takes the value (integer), which is why your expression is correct in this case. Ray -- comp.lang.c.moderated - clcm AT plethora DOT net