This code gives compile time error but I am unable to understand the reason.
Which error?
Only thing that I see missing, is a header file for getch(); .
[EDIT]
Oh, and it leaks memory ;)
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
Which error?
Only thing that I see missing, is a header file for getch(); .
Whoops, it is also lacking the implementation of constructor/destructors.
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
You defined the virtual generator function,I think it is illegal in C++ grammar
The sixth line and twelfth line
No, it is certainly not so i.e. avirtual destructor is perfectly legal.
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395