Homework/HW07/bin-trees-B.cc
void graphPrint(nodePtr rootp)
{
    if(rootp == NULL) return;
	
    // create an array to hold the output as is it generated
    vector<string> output;
    int pos = 0;
    pos = graphPrintWalk(rootp, pos, 0, output);
    
    // print the root node
    cout << string(pos,' ') << rootp << endl;
    
    // print the other levels from top to bottom
    for(int i=0;i<output.size();i++)
        cout << output[i] << endl;
}
/******************  P R I N T   T R E E   V E R T I C A L L Y  *************

The following function prints a binary tree vertically graphically
showing the connections between parent and child nodes The function
and support functions were written by C. George, C423, Fall 2004. */
P R I N T   T R E E   V E R T I C A L L Y
The following function prints a binary tree vertically graphically
showing the connections between parent and child nodes The function
and support functions were written by C.
P R I N T T R E E V E R T I C A L L Y The following function prints a binary tree vertically graphically showing the connections between parent and child nodes The function and support functions were written by C .
void graphPrint(nodePtr rootp)
{
    if(rootp == NULL) return;
    vector<string> output;
    int pos = 0;
    pos = graphPrintWalk(rootp, pos, 0, output);
    cout << string(pos,' ') << rootp << endl;
    for(int i=0;i<output.size();i++)
        cout << output[i] << endl;
}
void graphPrint ( nodePtr rootp ) { if ( rootp == NULL ) return ; vector < string > output ; int pos = 0 ; pos = graphPrintWalk ( rootp , pos , 0 , output ) ; cout << string ( pos , ' ' ) << rootp << endl ; for ( int i = 0 ; i < output . size ( ) ; i ++ ) cout << output [ i ] << endl ; }
P R I N T   T R E E   V E R T I C A L L Y
The following function prints a binary tree vertically graphically
showing the connections between parent and child nodes The function
and support functions were written by C. George, C423, Fall 2004.
P R I N T T R E E V E R T I C A L L Y The following function prints a binary tree vertically graphically showing the connections between parent and child nodes The function and support functions were written by C . George C423 Fall 2004 .
// create an array to hold the output as is it generated // print the root node // print the other levels from top to bottom