Hi Pall, I just took a look at posting this on your site... I have a few problems with it.
Firstly, I really want to title it as "war is private, the fight is pure" - there's no way to do that that I can see (it's not so much a mod of WAR has NO VALUE, as a reaction inspired by it). Secondly, this is not runnable. It is C++ code which is a compiled language (as I'm sure you know). Besides which, the code DOES NOT compile - the errors reported by the compiler (g++) are a vital part of understanding it. Lastly, related to the reason above, I'd like to display the error messages from the compiler as part of the code - like I have in the post. Is there any chance you could modify the system to accommodate some of this? Or recommendations for how to format it to achieve something akin to what I want within the existing microcodes system? Cheers, James. On 18/11/2009, "Pall Thayer" <[email protected]> wrote: >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 > _______________________________________________ NetBehaviour mailing list [email protected] http://www.netbehaviour.org/mailman/listinfo/netbehaviour
