SE250:lab-8:sbas046

From Marks Wiki
Revision as of 05:20, 3 November 2008 by Mark (Sọ̀rọ̀ | contribs) (3 revision(s))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Task 1

It worked after fixing all the errors. took 1 hour and 40 minutes

int main( ) {
    ParseTree* t = mkNode ('-', mkNode( '-', mkNode( 'a', 0 ), mkNode( 'b', 0 ), 0 ), 0);
    prefix_tree( t );
    printf( "\n" );
}


Task 2

<html><img src="http://img29.picoodle.com/img/img29/4/5/19/f_graphm_939eb27.jpg" border="0" alt="Yay! It worked!" /></a></html> Worked with Jasons fix to convert from dot to images.

int main( ) {
    ParseTree* t = mkNode ('-', mkNode( '-', mkNode( 'a', 0 ), mkNode( 'b', 0 ), 0 ), 0);
    char* filename = "graph.jpg";
    prefix_tree( t );
    printf( "\n" );
    tree_to_graph(t, filename);

}