Problem with Turbo C++

Gary Hennigan ghenniga at nmsu.edu
Tue Oct 2 13:22:48 AEST 1990


I hope someone can help me with this one!

   After much procrastinating I decided to attempt to learn C after many
years as a strictly FORTRAN programmer. I got started O.K. writing the
standard "Hello World" program and then some very simple file I/O code.
Now the trouble starts! What I want to do is read in a vector, actually 
the variable I use is a matrix but I only want to read one column from the
file which has a format like:

2
1.00
2.00

where two is the number of elements in the file. To accomplish this I
used this piece of code:

for( nr=1; nr <= Anr; nr++)
{
  fscanf( inpfile, "%f\n", &A[nr][1] );
}

Now everything compiles fine but when I run it I get the following error:

 scanf : floating point formats not linked
Abnormal program terminaion.

Anyone know what this means? I can run the code fine using VAXC or "cc"
on Unix but Turbo C++ always gives me the above errror on my PC.

   Thanks for any and all help,
   Gary Hennigan
  (ghenniga at NMSU.Edu)
  (.sig in for repairs)



More information about the Comp.lang.c mailing list