int main()
{
float A,B,C,D;
FILE *testing;
testing=fopen("testing.dat","r");
fscanf(testing,"%f %f %f %f",&A,&B,&C,&D);
return EXIT_SUCCESS;
|
FILE, it's probably not a good book. You should use the standard library class, ifstream:int main()
{
float A, B,C,D;
FILE *testing;
suture=fopen("testing.dat","r");
do
{
fscanf(testing,"%f %f %f %f",&A,&B,&C,&D);
printf("The Values of the data are:%f,%f,%f,%f \n", A, B, C, D);
}while (testing !=0, 0, 0, 0);
return EXIT_SUCCESS;
}
|