X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Dong Soo Kim Newsgroups: comp.os.msdos.djgpp Subject: Re: Please help where am i wrong Date: Wed, 10 Apr 2002 08:16:10 +1000 Organization: The University of New South Wales Lines: 30 Message-ID: References: <5a91d0ef DOT 0204090628 DOT 64a394f0 AT posting DOT google DOT com> NNTP-Posting-Host: mozart.orchestra.cse.unsw.edu.au Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: tomahawk.unsw.edu.au 1018390469 21391 129.94.242.14 (9 Apr 2002 22:14:29 GMT) X-Complaints-To: abuse AT unsw DOT edu DOT au NNTP-Posting-Date: Tue, 9 Apr 2002 22:14:29 +0000 (UTC) X-X-Sender: dsk666 AT mozart DOT orchestra DOT cse DOT unsw DOT EDU DOT AU In-Reply-To: <5a91d0ef.0204090628.64a394f0@posting.google.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 9 Apr 2002, Pradeepto K Bhattacharya wrote: > struct points > { > float x; > float y; > float z; > > } pts[16][12]; > > the loop: > for(i=0;i<17;i++){ > for(j=0;j<13;j++){ > fscanf(data,"%d %d %f",&pts[i][j].x,&pts[i][j].y,&pts[i][j].z); > } > } the loop is wrong too. it should be for (i=0; i < 16; i++) { for (j=0; j < 12; j++) { .. } } As pointed out by others, you need to change the "%d %d %f" to "%f %f %f" or alternatively change the definition of struct points. Good luck DSK