Where is the error?

code: https://ide.codingblocks.com/s/231637


insertinbst should be declared before build, a function cannot call another function declared after itself