This paper investigates the problem of localizing a sound source in a heated flow using a microphone array. Applications are found in studies dealing with the identification of sound sources in hot turbulent jets, or with the sound radiation from installed turbofans. Two configurations have been investigated: a shear layer flow (wind-tunnel type) and a jet flow. In the present study acoustic data are generated using a simulation based on the Linearized Euler Equations. For heated flows, refraction by temperature gradients is superimposed with refraction by velocity gradients, and the objective of this study is to assess whether this effect is important and how it can be accounted for in different source localisation methods. For this purpose, a time-reversal-based imaging method has been compared with a beamforming-based method in which the time-delays are computed based on ray tracing. For the shear flow, the results show that for high subsonic Mach numbers and steep thermal gradients, the thermal stratification must be taken into account to ensure a satisfactory precision of localisation for both methods. However, including the gradients of velocity and temperature is less crucial for imaging sound sources in the jet flow. The results indicate also that the localisation error is lower with the beamforming and ray-tracing technique than with the time-reversal technique, the latter being more sensitive to the limited array aperture.