TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK MASINGILL
from: CAMERON CLARK
date: 1997-05-14 19:50:00
subject: Re: Creating workable subcla

FM> notice that I was endeavoring, without success, to "fix" the problem that 
t
FM> DIVISION process needs floats rather than ints if THAT answer is to be
FM> accurate.  I, apparently, didn't gain anything by separating the Calc 
varia
    Why not use a quotient/remainder for the division. 
    void divide(int x, int y, int* quo, int* rem = 0);
    you can call it like
    int quo; int rem;
    divide(5,2,&quo);
    divide(5,2,&quo,&rem);
    In the procedure just test rem != 0 to see if you need to
    calculate a remainder.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.