JeZ+Lee needs help with SDL and C++ Classes…
Hi,
I am trying to learn C++ Classes.
I am having much trouble learning this concept.
Tying to use SDL in a class definition.
Can someone please help me!
The following is “Audio.H” file with errors:==============================================================================
// Audio.H
#define MusicTotal 3
#define SoundTotal 10
////////////////////////////////////////
///////////|
//
|
// C L A S S
|
//____________________________________________________________________________
______________________|
class Audio
{
public:
Audio(void);
virtual ~Audio(void);
Mix_Music *MusicTrack[MusicTotal]; //ERRORS HERE
int MusicVolume;
Mix_Chunk *SoundFX[SoundTotal]; // MORE ERRORS HERE TOO
int SoundVolume;
void LoadMusic(void);
void UnLoadMusic(void);
void PlayMusic(Uint8 musicIndex);
void LoadDigitalSoundFX(void);
void UnLoadDigitalSoundFX(void);
void PlayDigitalSoundFX(Uint8 soundIndex);
};
//____________________________________________________________________________
//
|
//
C L A S S |
//
|
////////////////////////////////////////
///////////
======================
ERRORS:
1>c:\documents and settings\jez-l-lee\my documents\visual studio
2005\projects\lettersfall\tetribattle3_100percent\Audio.h(19) : error C2143: syntax
error : missing ‘;’ before ‘*’
1>c:\documents and settings\jez-l-lee\my documents\visual studio
2005\projects\lettersfall\tetribattle3_100percent\Audio.h(19) : error C4430: missing
type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\jez-l-lee\my documents\visual studio
2005\projects\lettersfall\tetribattle3_100percent\Audio.h(19) : error C4430: missing
type specifier - int assumed. Note: C++ does not support default-int
Thanks in advance!
Jesse “JeZ+Lee” Palser
SLNTHERO at AOL.com (mailto:SLNTHERO at AOL.com)
Silent Hero Productions®
http://www.silentheroproductions.com/
(http://www.silentheroproductions.com/) (http://www.SilentHeroProductions.com)