NH> Just thinking about it some more, it seems that a BCD
NH> class would be in order. How could I go about
NH> investigating the existance of same?
NH> Would anyone care to speculate on the comparitive
NH> difficulties of doing this in C as opposed to C++?
nh>....
It should be easy in C or C++, using bitfields.
class binary_coded_decimals{
private:
int
hundred_billions :4,
ten_billions :4,
billions :4,
hundred_millions :4,
ten_millions :4,
millions :4,
hundred_thousands :4,
ten_thousands :4,
thousands :4,
hundreds :4,
tens :4,
ones :4;
};
typedef struct{
int
hundred_billions :4,
ten_billions :4,
billions :4,
hundred_millions :4,
ten_millions :4,
millions :4,
hundred_thousands :4,
ten_thousands :4,
thousands :4,
hundreds :4,
tens :4,
ones :4;
} binary_coded_decimals;
The code to manage them I will leave up to the imagination. :)
It would be basically the same in either case.
> ] Let's try randomly accessing YOUR memory once...............
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|