Hello!
What data type should I use to declare variables that hold fractions ??
I've looked everywhere, but can't find an answer.
<my geometric calculator will be ready in few hours!>
Printable View
Hello!
What data type should I use to declare variables that hold fractions ??
I've looked everywhere, but can't find an answer.
<my geometric calculator will be ready in few hours!>
Floats or doubles.
Take a look at the boost library or write your own rational numbers class. Thats a simple enough exercise.