When you want to read floating point data with the fscanf function, remember that the type must be float i.e. you cannot use double. Here is an example demonstrating what happens when you use double:
Saturday, March 20, 2010
Subscribe to:
Post Comments (Atom)
2 comments:
You have to use long modifier to read and assign double variables from file or console. i.e. 'fscanf(file,"%lf",&x);'
Grazie mille :)
Post a Comment