![]() |
|
#1
|
|||
|
|||
Regarding virtual function ...getting an errorCPP / C++ / C Code:
am getting error in int main() itz giving like :cannot declare variable `m' to be of type `eventhandler_mul_list' because the following virtual functions are abstract: 14 C:\Dev-Cpp\assign1.cpp virtual void handlerlist::add(eventhandler*) i know we cant create objects of a class with virtual function is meaning less but ,a not able to find the prblm in here... can any body please help me over this???? Last edited by LuciWiz : 03-Jul-2008 at 23:58.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
||||
|
||||
Re: Regarding virtual function ...getting an errorThe class eventhandler_mul_list inherits from eventhandler, which has a pure virtual function declared.
All children MUST define that function, otherwise they will inherit it as pure virtual as well, and will not be able to be instantiated (and will pass it to their children). Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
|||
|
|||
Re: Regarding virtual function ...getting an errorQuote:
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 65 | 19-Aug-2009 08:50 |
| Linked Lists advice request | promsan | C Programming Language | 74 | 23-May-2007 09:29 |
| Major newbie problem | cynack | MS Visual C++ / MFC Forum | 1 | 08-Apr-2007 12:25 |
| Winsock error when compiling FLTK 2.0 Projects | mauriciorossi | FLTK Forum | 3 | 16-Aug-2005 11:18 |
| Help with syntax errors | PeteGallo | C Programming Language | 7 | 08-Aug-2005 21:30 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The