Vicual C++ 6.0 and SDL_ttf

Visual C++ 6.0 seems not to recognize * always as a multiplication and it
occurs, that there is 2 times an error, where VC seems to recognize this by
a pointer operation. I changed just by adding a new line of code in both
cases and… voila no problem anymore… Was that right or is it silly, what
I did ? (I am not sure, so):

I changed the line:
src = glyph->pixmap.bitmap + row * glyph->pixmap.cols;

to

src = glyph->pixmap.bitmap;
src += row * glyph->pixmap.cols;

Now it works… stupid… isn’t it ?

Visual C++ 6.0 seems not to recognize * always as a multiplication and it
occurs, that there is 2 times an error, where VC seems to recognize this by
a pointer operation.

I don’t believe it; not even VC++ should be that broken. Most likely something
else is wrong with your program

Visual C++ 6.0 seems not to recognize * always as a multiplication and it
occurs, that there is 2 times an error, where VC seems to recognize this by
a pointer operation.

I don’t believe it; not even VC++ should be that broken. Most likely something
else is wrong with your program

No, he’s referring to the fact that VC++ doesn’t allow multiplication
of void pointers.

Was this in SDL_ttf 1.2 or the experimental SDL_ttf 2.0?

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Hi Sam !

I had the problem with SDL_ttf 1.2, but changing the code in 2 lines made me
get rid of the problem (errors) and changing another bit of code (i think
you left out one float cast) got me rid of the warnings… I might look it
up, where i did the changes, if needed.

regards,

sascha

-----Urspr?ngliche Nachricht-----Von: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Im Auftrag
von Sam Lantinga
Gesendet: Donnerstag, 12. April 2001 20:50
An: sdl at lokigames.com
Betreff: Re: [SDL] Vicual C++ 6.0 and SDL_ttf

Visual C++ 6.0 seems not to recognize * always as a multiplication and it
occurs, that there is 2 times an error, where VC seems to recognize this
by

a pointer operation.

I don’t believe it; not even VC++ should be that broken. Most likely
something
else is wrong with your program

No, he’s referring to the fact that VC++ doesn’t allow multiplication
of void pointers.

Was this in SDL_ttf 1.2 or the experimental SDL_ttf 2.0?

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

No, he’s referring to the fact that VC++ doesn’t allow multiplication
of void pointers.

neither does gcc (maybe you mean addition)

in any case, -Wpointer-arith is good to guard against accidental void
pointer arithmetic