Author
anonymous
about 7 years ago
Language
Compiler
Options
Author
anonymous
about 7 years ago
$
prog.cc: In function 'void CallEvent(Event*)':
prog.cc:21:32: error: invalid new-expression of abstract class type 'Event'
WhatEvent = new Event();
^
prog.cc:3:11: note: because the following virtual functions are pure within 'Event':
class Event
^~~~~
prog.cc:6:24: note: 'virtual void Event::Run(int)'
virtual void Run(int Param) = 0;
^~~
prog.cc:22:21: error: request for member 'Run' in 'WhatEvent', which is of pointer type 'Event*' (maybe you meant to use '->' ?)
WhatEvent.Run(123);
^~~
prog.cc:23:17: warning: deleting object of abstract class type 'Event' which has non-virtual destructor will cause undefined behavior [-Wdelete-non-virtual-dtor]
delete WhatEvent;
^~~~~~~~~
Exit Code:
1