i have this code which doesnt work:
void CAnalyzerIF::SetData(int i_iIters, const CParameterSet* i_CParameterSet)
{
const CParameterSet ParameterSet=(*i_CParameterSet); //thous are the problem
const CParameterSet* pCParameterSet=&ParameterSet; //lines
// ... now im sending the pCParameterSet to other class
}
ive tried to configure them in the header but the it just doest compile.
and now it do compile but it fail on run time.
maybe i should copy it in some binary way…. i dont know.
thanks for the help
If you need to clone the i_CParametreSet you need:
“copy constructor”
probably does not works due to
protected private members )
You should also pay attention on the class content and decide if you need a Shallow Copy or a Deep Copy of the class instance.