Using Chandra observations, we study the X-ray emission of the stellar population in the compact dwarf elliptical galaxy M32. The proximity of M32 allows one to resolve all bright point sources with luminosities higher than 8e33 erg/s in the 0.5--7 keV band. The remaining (unresolved) emission closely follows the galaxys optical light and is characterized by an emissivity per unit stellar mass of ~4.3e27 erg/s/M_sun in the 2--10 keV energy band. The spectrum of the unresolved emission above a few keV smoothly joins the X-ray spectrum of the Milky Ways ridge measured with RXTE and INTEGRAL. These results strongly suggest that weak discrete X-ray sources (accreting white dwarfs and active binary stars) provide the bulk of the ``diffuse emission of this gas-poor galaxy. Within the uncertainties, the average X-ray properties of the M32 stars are consistent with those of the old stellar population in the Milky Way. The inferred cumulative soft X-ray (0.5--2 keV) emissivity is however smaller than is measured in the immediate Solar vicinity in our Galaxy. This difference is probably linked to the contribution of young (age <1Gyr) stars, which are abundant in the Solar neighborhood but practically absent in M32. Combining Chandra, RXTE and INTEGRAL data, we obtain a broad-band (0.5--60 keV) X-ray spectrum of the old stellar population in galaxies.