[LC++]STL Iterators and integers

Jack Lloyd lloyd at acm.jhu.edu
Fri Aug 10 02:11:05 UTC 2001


>     The alternatives I've found were to convert all the time (hope you
> don't need performance), or to use the address of the first element of an
> STL vector for GL which, to my knowledge, isn't technical portable.

Yeah, I've seen people use v.begin() or &v[0] in an attempt to get an array
out of it. The begin() option works on Visual C++ (at least I presume it does
because the code I was looking came from that kind of place) and gcc 2.95.x,
but not gcc 3.0.

> (I've heard hints that this might change, but the standards committee
> isn't known for their speed on such issues, and few compiler venders have
> been quit to reach compliance.)

Yeah, maybe if vendors could actually implement things like, oh, proper
for-loop scoping and half way decent templates, not to mention things like
export, I would have a litte more faith.

The only libraries that I can think of that satisfy your requirements are
OpenGL and the SDL. Both are portable, cross-platform, freely usable and
available. And written in C. :)

I think your best bet is finding or writting a C++ wrapper for SDL, because it
does seem good for general multi-media apps. It's unfortunate that C and C++
are so compatable. People wrote SDL language wrappers for Ada, Eiffel, Java,
ML, Pascal, Perl, Python, Ruby, Guile, PHP (!!), and some language I never
even heard of. But no C++ wrapper (actually I searched for "SDL C++" and found
some old projects, but nothing since 99 or so).

Jack




More information about the tuxCPProgramming mailing list