What I see is you are missing the functions's prototypes in your code(no matter here)
There is a problem with the insert_element(). Try removing it😉 ( just comment it 😁) and edit Tri_T(T, N+1) to Tri_T(T, N)
I will explain it to you tomorrow, it's too late now!
Have a good night!