Wrox Programmer Forums
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 4th, 2007, 11:39 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default fscanf for double

use fscanf to read a a double value in a text file
What kind of paramter will fill the second argument of fscanf?

float f1;
fscanf(fp,"%f",f1);//right , no problem

double f2;
fscanf(fp,"%f",&f2);//cannot read value,f2 will not be changed

 
Old August 13th, 2007, 07:38 PM
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark
Default

the second one is the correct syntax dont know why you would get an error there.





Similar Threads
Thread Thread Starter Forum Replies Last Post
double in binär walid C# 1 January 24th, 2007 03:23 PM
Double Quotes langer123 Classic ASP Basics 2 March 16th, 2005 06:22 PM
double queue mafuka C++ Programming 1 April 6th, 2004 01:08 PM
Double-buffering katsarosj ASP.NET 1.0 and 1.1 Professional 2 March 2nd, 2004 08:31 PM
Double E-Mails SerranoG Forum and Wrox.com Feedback 1 December 9th, 2003 03:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.