[SDL] Compile-time error when forward declaring Mix_Chunk
Gianfranco Berardi
gberardi at gbgames.com
Fri Oct 6 06:10:39 PDT 2006
Vassilis Virvilis wrote:
>
> In my setup I can't forward declare Mix_Music;
>
> The reason people are using this typedef trick is to provide an
> opaque pointer. This is a pointer where the programmer cannot reach
> the internal variables freely. Unfortunately in C++ which
> has proper access mechanisms (private, protected) that means
> we have to drag the whole header file in our headers.
>
Ah, thank you for clarifying this issue. I was going to try to include
the header in my header, but I didn't want to do so without
understanding why I felt I had to do so. Now I see it is pretty much
required.
Thanks again,
Gianfranco
--
GBGames' Blog, An Indie Game Developer's Somewhat Interesting Thoughts:
http://www.gbgames.com/blog
Staff Reviewer for Game Tunnel, the Independent Underground:
http://www.gametunnel.com
More information about the SDL
mailing list