Macromolecular compounds obtained by functionalisation op polymers with a nitrogen containing compound used as base material