Test TreeManip

Modify your main.cpp file to look like this:

#include <iostream>
#include "node.hpp"
#include "tree.hpp"
#include "tree_manip.hpp"

using namespace strom;

int main(int argc, const char * argv[])
    std::cout << "Starting..." << std::endl;
    TreeManip<Node> tm;
    std::cout << "\nFinished!" << std::endl;

    return 0;

All we’ve done differently is to create a TreeManip object and call its createTestTree() function, whereas previously we constructed a Tree object that called its createTestTree() function in its constructor.

Try running the program now. The output is the same as before, except for two additional lines generated by the TreeManip constructor and destructor.