Hello Frank,
In a message dated 13 May 97 you wrote to Cliff Rhodes:
FM> Your critique and that of anybody else who reads will be
FM> appreciated. Did I make ANY progress?
:) Of course... all that's needed is to change the line that says:
float Calc::Divide() { return Num1 / Num2; }
to read:
float Calc::Divide() { return (float) Num1 / (float) Num2; }
Its something known as Casting, and basically what it does is to promote Num1
and Num2 to float-type variables before performing the calculation, and in
he
case of your program, will make the function return the correct 6.78261
ather
than just 6.
___
/__/ Fido: 2:250/344.0 Internet: pgreen@borghome.demon.co.uk
/ aul Sysop of the Borg Homeworld BBS (0113) 2253772 - Borgnet NC
... Dairy farmers make their living off udders.
-=o Paul's Groovy Tagline Generator v1.1, (c) 1996 Paul Green o=-
--- Mail Manager 1.22x/n #1215
---------------
* Origin: The Borg Homeworld BBS! (0113) 2253772 V34 (2:250/344.0)
|