Accreting neutron stars and black holes