PlasmaZero
Programmer
I'm trying to compile a set of classes I wrote. Most seem to compile OK, but two out of the 10 or so won't compile at all. These two are derived from a class, which is a child, etc, and they are at the end of the inheritance. I checked several times for an extra semicolon or something that would prevent them from being recognized as class definitions, but I can't find anything. The compiler simply gives tons of errors: "_____ missing storage-class or type specifiers". Here's one of the class headers:
#if !defined(TRACK)
#define TRACK
#include "seq.h"
#include "util.h"
#include "soundgen.h"
class Track : public Seq
{
public:
Track();
Track(SoundGen inst);
~Track();
double output_sample();
SoundGen get_Instrument() {return instrument;}
void set_Instrument(SoundGen sg) {instrument = sg;}
double get_Gain() {return gain;}
void set_Gain(double newgain) {gain = newgain;}
// Note manip
void addNote(Note note);
void removeNote(int index);
void insertNote(int index, Note note);
Note getNote(int index);
private:
SoundGen instrument;
Notes notes;
double gain;
};
#endif // TRACK
The files included by this compile fine, which are laid out in the same structure.
When this file (track.h) is included, the compiler gives tons of syntax errors, things like missing semicolons which I know isn't the case. I have no idea why it won't compile this, I've looked over it many times by now and don't see anything wrong with it. I'd appreciate any thoughts.
Thanks
#if !defined(TRACK)
#define TRACK
#include "seq.h"
#include "util.h"
#include "soundgen.h"
class Track : public Seq
{
public:
Track();
Track(SoundGen inst);
~Track();
double output_sample();
SoundGen get_Instrument() {return instrument;}
void set_Instrument(SoundGen sg) {instrument = sg;}
double get_Gain() {return gain;}
void set_Gain(double newgain) {gain = newgain;}
// Note manip
void addNote(Note note);
void removeNote(int index);
void insertNote(int index, Note note);
Note getNote(int index);
private:
SoundGen instrument;
Notes notes;
double gain;
};
#endif // TRACK
The files included by this compile fine, which are laid out in the same structure.
When this file (track.h) is included, the compiler gives tons of syntax errors, things like missing semicolons which I know isn't the case. I have no idea why it won't compile this, I've looked over it many times by now and don't see anything wrong with it. I'd appreciate any thoughts.
Thanks