In a recent daf yomi Rambam says that for Ir Hanidachat that the women and children are also killed. Yad Ramah asks on Rambam that why should the women be killed if they didnt sin and for children even if they sinned they are minors. Ramah concludes that G-d would not do any evil (ve-chalila la-kel mi-resha) -- Eli Turkel