I need to create a clone of a class (the same class as my earlier vector topic)
the call looks like this:
in my class the clone() is the following:Code:clone_test=List_Num_1.clone();
Upon returning "temp" it crashes...Code:CNameValueList CNameValueList::clone() { CNameValueList temp; string strValue; string strName; for (MYVECTORITER the_iterator=list.begin(); the_iterator != list.end(); the_iterator++) { strValue=(*the_iterator)->getValue(); strName=(*the_iterator)->getName(); temp.add(strName,strValue); } return temp; }
Can anyone give me a hint as to why this code doesn't work?



LinkBack URL
About LinkBacks


