  We investigate the physical processes which lead to the formation of massive
stars. Using a numerical simulation of the formation of a stellar cluster from
a turbulent molecular cloud, we evaluate the relevant contributions of
fragmentation and competitive accretion in determining the masses of the more
massive stars. We find no correlation between the final mass of a massive star,
and the mass of the clump from which it forms. Instead, we find that the bulk
of the mass of massive stars comes from subsequent competitive accretion in a
clustered environment. In fact, the majority of this mass infalls onto a
pre-existing stellar cluster. Furthermore, the mass of the most massive star in
a system increases as the system grows in numbers of stars and in total mass.
This arises as the infalling gas is accompanied by newly formed stars,
resulting in a larger cluster around a more massive star. High-mass stars gain
mass as they gain companions, implying a direct causal relationship between the
cluster formation process, and the formation of higher-mass stars therein.
