At what age do men stop having erections?

After death. They may not be so strong or frequent at age 80 as at age 16, and some older men stop altogether, but there is no specific time.