Mail Archives: djgpp/1998/08/25/00:01:37
Stephen Snape (stephen DOT snape AT virgin DOT net) wrote:
: Could someone tell me whats wrong with this,
:
: double var
: int num
:
: void check_bit(void)
: {
: return var<<num;
: }
:
: DJGPP won't let this happen. I can't access a bit in a double, why? It
: keeps saying invalid operand to binary, and it's driving me mad.
1. Semi-colons omitted.
2. void return type but you still return something.
3. What do you really want to happen? If it was a float you could do
some ugly casting (something like *(int *)(&var)), but IIRC,
double's size doesn't match long or long long this wont work too
good. So some additional code would be necessay. Anyway the result
is almost meaningless.
Cocteau Twins, Blue Bell Knoll,
MartinS
- Raw text -