Summary Files Commits Branches @commit @diff @stats
path: root / src / blog / sane-explanation-of-compilers / part-1 / proper / tree.h
blob: fdddab3bbc672b44717884a92998bec0c4d6c5de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef TREE
#define TREE

#include <stdlib.h>
#include <stdio.h>

typedef struct node {
	char val;
	struct node *left;
	struct node *right;
} node;

node* newNode(char val, node *left, node *right);
void printTree(node *n, int level);
void freeNode(node *n);

#endif