Why I have to put * on the right side of the name of the type of data??
Why it doesn't work with:

*r=(*nodo)malloc(sizeof(nodo));

Because nodo is treated as a kind of type, like int , whereas r is a variable. So, having *nodo makes no sense; you wouldn't see something like *int either. I think the malloc either returns void * or char * , I can't remember which. Either way, you need to cast to the type you need, hence the (nodo *) part.

You could probably use new instead of malloc in this code. Also, are you sure about (*r)->izq = NULL ? it looks like it should be either (*r).izq = NULL or, more usually, r->izq = NULL ?