Nemisis: getting the distance from your tank (camera, whatever) to the enemy is pretty simple if you assign a different pointer to each enemy tank.
distance = vec_dist(camera.x, tank23.x);
Put this line inside a while(1) loop and you are done with that. Please use my code sample for "Thanks" if you want to control the barrel using the mouse. I will answer your question regarding mouse_ent in the following magazine.
Have a nice day.
George.