Rob and James, these are great. Why not post them as mods at:
http://pallit.lhi.is/microcodes/contr.php?code_id=43
james morris wrote:
> mus...@debmus:~$ cat warclass.cc
> class war
> {
> war();
> virtual ~war();
> virtual void fight() = 0;
> };
>
> int main()
> {
> war mywar;
> return 0;
> }
> mus...@debmus:~$ g++ warclass.cc
> warclass.cc: In function ‘int main()’:
> warclass.cc:3: error: ‘war::war()’ is private
> warclass.cc:10: error: within this context
> warclass.cc:10: error: cannot declare variable ‘mywar’ to be of abstract
> type ‘war’
> warclass.cc:2: note: because the following virtual functions are pure
> within ‘war’:
> warclass.cc:5: note: virtual void war::fight()
> warclass.cc:4: error: ‘virtual war::~war()’ is private
> warclass.cc:10: error: within this context
> _______________________________________________
> NetBehaviour mailing list
> [email protected]
> http://www.netbehaviour.org/mailman/listinfo/netbehaviour
_______________________________________________
NetBehaviour mailing list
[email protected]
http://www.netbehaviour.org/mailman/listinfo/netbehaviour