I need to calculate the height of a trie tree in C

the node struct is as follows:

```
struct trie_cel {
char type; // 'I': internal / 'P': letter
struct trie_cel *child [HEIGHT_ALPHABET]; // use the function CHAR_TO_INDEX to get child node of each letter
};
typedef struct trie_cel no;

```

i'm trying to use recursion

```
if(r == NULL) return -1;
if(!r) return 0;
int alt = 0;
int heightM = 0;
no** i = r->child;
no** fim = i + (sizeof(r->child) / sizeof(no *));
while(i != end){
    alt = height(r->child[i])+1;
    if(alt > heightM){
        heightM = alt;
    }
}
return heightM;

```

However, my code is presented with the following problem, could anyone help me?

```
    trie.cpp: In function ‘int altura(no*)’:
trie.cpp:146:32: error: invalid types ‘trie_cel* [27][no** {aka trie_cel**}]’ for array subscript
         alt = height(r->child[i])+1;
                                ^
chmod: cannot access 'vpl_execution': No such file or directory

```

**I was able to calculate using "int" but i'd like to learn how to calculate using pointers**