B
Barry
Hi,
I have an abstract class called "Event" and a number of classes which
inherit from it, including "NoteOn" and "NoteOff".
I am now attempting to create a multimap called EventList, as follows
-
#ifndef EVENT_LIST_H
#include <map>
#include "Event.h"
class EventList : public std::multimap<double,Event>
{
public:
EventList(void);
virtual ~EventList(void);
};
#endif
#ifndef EVENT_H
class Event
{
public:
Event(void);
virtual void dummy() = 0;
virtual ~Event(void);
};
#endif
but this isn't allowed according to my compiler because 'Event' :
cannot instantiate abstract class.
I don't understand why I get this fail since I haven't even created a
EventList object yet.
What is the issue here?
Thanks,
Barry
I have an abstract class called "Event" and a number of classes which
inherit from it, including "NoteOn" and "NoteOff".
I am now attempting to create a multimap called EventList, as follows
-
#ifndef EVENT_LIST_H
#include <map>
#include "Event.h"
class EventList : public std::multimap<double,Event>
{
public:
EventList(void);
virtual ~EventList(void);
};
#endif
#ifndef EVENT_H
class Event
{
public:
Event(void);
virtual void dummy() = 0;
virtual ~Event(void);
};
#endif
but this isn't allowed according to my compiler because 'Event' :
cannot instantiate abstract class.
I don't understand why I get this fail since I haven't even created a
EventList object yet.
What is the issue here?
Thanks,
Barry