Example #1
0
int main()
{
    int i=1;
    treenode *root;
    root = binary_tree();
    flatten(root);
    while(root->right != NULL) {
        printf("%d ", root->content);
        root = root->right;
        i++;
    }
    printf("\n%d\n", i);
    return 0;
}
Example #2
0
 binary_tree &operator = (binary_tree &&other) {
     binary_tree(other).swap(std::move(*this));
     return *this;
 }
Example #3
0
 binary_tree &operator = (const binary_tree &other) {
     binary_tree(other).swap(*this);
     return *this;
 }