Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Node {
- Node *left, Node *right;
- Void #ctor( Int depth ) { // constructor
- if( depth > 0 ) {
- left = new Node( depth - 1 );
- right = new Node( depth - 1 );
- }
- }
- }
- @ctime Node *a = new Node( 5 );
- Node *b = new Node( 2 );
- Void main() {
- const( Node ) *ptr = userInput ? a : b;
- printTree( ptr );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement