Language: C++

#include<iostream>

#define MAX 10000
#define NIL -1

using namespace std;

int p, n;
struct Node {p, l, r;};
sturct Node T[MAX];

void preParse (int u) {

    if (u == NTL) {
        return ;
    }

    cout << " " << u;

    preParse (T[u].l);
    preParse (T[u].r);

}

void inParse (int u) {

    if (u == NTL) {
        return ;
    }

    inParse (T[u].l);

    cout << " " << u;

    inParse (T[u].r);

}

void postParse (int u) {

    if (u == NTL) {
        return ;
    }

    postParse (T[u].l);
    postParse (T[u].r);

    cout << " " << u;


}

int main () {

    int i, v, l, r, root;

    cin >> n;
    for (i = 0; i < n; i++) {
        T[i].p = NTL;
    }

    for (i = 0; i < n; i++) {
        cin >> v >> l >> r;

        T[v].l = l;
        T[v].r = r;

        if (l != NTL) {
            T[l].p = v;
        }
        if (r != NTL) {
            T[r].p = v;
        }

    }

    for (i = 0; i < n; i++) {
        if (T[i].p == NTL) {
            root = i;
        }
    }

    cout << "Preorder" << endl;
    preParse (root);
    cout << endl;

    cout << "Inorder" << endl;
    inParse (root);
    cout << endl;

    cout << "Postorder" << endl;
    postParse (root);
    cout << endl;

    return 0;

}

Compiler output:
a.cc:9:14: error: 'p' does not name a type
    9 | struct Node {p, l, r;};
      |              ^
a.cc:10:1: error: 'sturct' does not name a type; did you mean 'struct'?
   10 | sturct Node T[MAX];
      | ^~~~~~
      | struct
a.cc: In function 'void preParse(int)':
a.cc:14:14: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   14 |     if (u == NTL) {
      |              ^~~
      |              NIL
a.cc:20:15: error: 'T' was not declared in this scope
   20 |     preParse (T[u].l);
      |               ^
a.cc: In function 'void inParse(int)':
a.cc:27:14: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   27 |     if (u == NTL) {
      |              ^~~
      |              NIL
a.cc:31:14: error: 'T' was not declared in this scope
   31 |     inParse (T[u].l);
      |              ^
a.cc: In function 'void postParse(int)':
a.cc:41:14: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   41 |     if (u == NTL) {
      |              ^~~
      |              NIL
a.cc:45:16: error: 'T' was not declared in this scope
   45 |     postParse (T[u].l);
      |                ^
a.cc: In function 'int main()':
a.cc:59:9: error: 'T' was not declared in this scope
   59 |         T[i].p = NTL;
      |         ^
a.cc:59:18: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   59 |         T[i].p = NTL;
      |                  ^~~
      |                  NIL
a.cc:65:9: error: 'T' was not declared in this scope
   65 |         T[v].l = l;
      |         ^
a.cc:68:18: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   68 |         if (l != NTL) {
      |                  ^~~
      |                  NIL
a.cc:71:18: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   71 |         if (r != NTL) {
      |                  ^~~
      |                  NIL
a.cc:78:13: error: 'T' was not declared in this scope
   78 |         if (T[i].p == NTL) {
      |             ^
a.cc:78:23: error: 'NTL' was not declared in this scope; did you mean 'NIL'?
   78 |         if (T[i].p == NTL) {
      |                       ^~~
      |                       NIL