The operators < and > of GreedyObject and MNode should be declared const.
Also you have to #include <ctime> and <cstring>
Kurt