Yes. I know I must cast returned value to right type, but I saw quake2 source code and found carmack doesn’t cast type at all.
source code is something like this :
qglAccum = GetProcAddress(hModule, “glAccum”);
How is this code compiled without an error?
Some compiler option?
I wanna know how.
Declare function type and cast to it for every single dll function… so annoying.
It’s because the files are compiled as C sources, which have less stringent type checking than if you compile them as C++ sources. There are still warnings however, but I guess he disables them with the line #pragma warning (disable : 4113 4133 4047 )
Ah. I got it. Thanx.
So, Is there a compiler option (or some #pragma directive) that can alleviate the strictness of type checking as C compiler level?
One thing I have discovered is that programming is a lot easier if you just do what has to be done to make something work, and ignore things which are ‘annoying’.
So what if you do not like type casts, if there is no other way then just do it and be annoyed by more important things
But, seriously, LOL has something with ROTFL? Am I right?[/b]
Short of sampling myself laughing then emailing you the mp3, I use the common internet short hand for ‘laugh-out-loud’. It’s not something I like doing, using internet shorthand, but it’s pretty difficult to express laughter in any other way.
Maybe I could pretend to be a narrator, and treat myself as the protagonist - something like:
“knackered chuckles warmly to himself at the reverse cast”