The effective temperatures of carbon-rich stars