Przekazywanie argumentu

0

Mam taki kod :

public: XmlElement^ DodajElement(XmlDocument xz ,XmlElement^ rodzic,String^ tag,String^ wartosc)
		{
			  
			XmlElement^ el  =xz.CreateElement(tag);
		
			el->InnerText=wartosc;
			rodzic->AppendChild(el);
			return el;
		}


public: XmlElement^ UtworzWpis(XmlDocument xz, String^ imie, String^ nazwisko, String^ firma, String^ email, String^ gg, 
			String^ opcja, String^ ilstr, String^ poz, String^ inst, String^ logo, String^ suma, String^ zre, String^ Id)
		{
			XmlElement^ rec = xz.CreateElement("rec");
			rec->SetAttribute("Id",Id);
			DodajElement(xz,rec,"imie",imie);
			DodajElement(xz,rec,"nazwisko",nazwisko);
			DodajElement(xz,rec,"firma",firma);
			DodajElement(xz,rec,"email",email);
			DodajElement(xz,rec,"gg",gg);
			DodajElement(xz,rec,"opcja",opcja);
			DodajElement(xz,rec,"ilstr",email);
			DodajElement(xz,rec,"poz",poz);
			DodajElement(xz,rec,"inst",inst);
			DodajElement(xz,rec,"logo",logo);
			DodajElement(xz,rec,"suma",suma);
			DodajElement(xz,rec,"zre",zre);


			
			return rec;
		}

i czemu nie chce mi przekazac argumentu rec do funkcji ??? wyskakuje mi bląd :
error C3073: 'System::XmlDocument' : ref class does not have a user-defined copy constructor

0

Problem jest z parametrem xz, nie wolno przekazywać XmlDocument przez wartość, przekaż ten parametr przez referencje.

1 użytkowników online, w tym zalogowanych: 0, gości: 1