ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/09/10:30:28

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: pradeeptob AT yahoo DOT com (Pradeepto K Bhattacharya)
Newsgroups: comp.os.msdos.djgpp
Subject: Please help where am i wrong
Date: 9 Apr 2002 07:28:24 -0700
Organization: http://groups.google.com/
Lines: 38
Message-ID: <5a91d0ef.0204090628.64a394f0@posting.google.com>
X-Trace: posting.google.com 1018362505 13195 (9 Apr 2002 14:28:25 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 9 Apr 2002 14:28:25 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi all,
  Well I cannot understand where i am going wrong. Well i am trying to
read some values from a file and store them in a 2D array of
structure.The points are stored in file in this way:
0 0 93.515722
0 20 93.756786
20 0 96.049438
20 20 93.200324
....and so on(192 rows of values in all).

I need the points in 2d array coz i am using them to plot on screen .
struct points
    float x;
    float y;
    float z;

} pts[16][12];

the loop:
  fscanf(data,"%d %d %f",&pts[i][j].x,&pts[i][j].y,&pts[i][j].z);

I get this error when i run the program (compiled with BCC 3.1)
 scanf: floating point formats not linked 
 abnormal program termination
and it stops responding when compiled with DJGPP , i have to CTRL-BRK
to get out of it.

Please tell me whats going wrong(i hope it is not very foolish:), i
desperately need some help.Thanx in advance


- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019