Macromolecular compounds obtained by functionalisation op polymers with a nitrogen containing compound