Macromolecular compounds from nitrogen-containing monomers obtained otherwise than by reactions only involving carbon-to-carbon unsaturated bonds