A heat generating resistor having a functional thin film comprising an amorphous material containing halogen atoms and hydrogen atoms non-uniformly distributed in a matrix of carbon atoms formed on a substrate. Optionally, the thin film also contains silicon and/or germanium, and a substance for controlling the electroconductivity of the thin film. The optional ingredients are also non-uniformly distributed within the thin film.