The process of charm quark fragmentation is studied using D * ± meson production in deep-inelastic scattering as measured by the H1 detector at HERA. The parameters of fragmentation functions are extracted for QCD models based on leading order matrix elements and DGLAP or CCFM evolution of partons together with string fragmentation and particle decays. Additionally, they are determined for a next-to-leading order QCD calculation in the fixed flavour number scheme using the independent fragmentation of charm quarks to D * ± mesons. Two different regions of phase space are investigated defined by the presence or absence of a jet containing the D * ± meson in the event. The fragmentation parameters extracted for the two phase space regions are found to be different.