I know I could just make all the Mix_Musics public, and not worry about the problem, but I'd still like to understand how to do it.
//header.h
class Music
{
private:
Mix_Music * BGMusic, * fall, * reset, * teleport, * win, * singleCubeWin;
public:
Music();
bool loadMusic();
void clean_up();
Mix_Music * getSound( Mix_Music * m ) { return m; }
};
//program.cpp
Music Sound;
int main( int argc, char* args[] )
{
...
Mix_PlayMusic( Sound.getSound( "BGMusic" ), -1 );
...
}