Error: cannot cast from object.Object to Rat
The code I have is as follows:
int opCmp( Object o ) {
Rat other = cast(Rat) o; <--- this line throws the error
…
//stuff to return -1, 0, or 1 to opCmp with rational
numbers for <, >=, etc.
…
}
Thanks to anyone who can help!
