Can anyone help me ~please~~~!!
-
i have a problem about overload operator = this is my code CStringList& CTESTADOView::operator =(CStr &str) { this->lst=str.list; return(lst); } : error C2582: 'CStringList' : 'operator =' function is unavailable can anyone tell me where the wrong?? thanks in advance~~~!:laugh::laugh::laugh::laugh: nothing
-
i have a problem about overload operator = this is my code CStringList& CTESTADOView::operator =(CStr &str) { this->lst=str.list; return(lst); } : error C2582: 'CStringList' : 'operator =' function is unavailable can anyone tell me where the wrong?? thanks in advance~~~!:laugh::laugh::laugh::laugh: nothing
From the compiler message: There is something wrong with = overloaded operator of CStringList. This means that there is no overloaded operator = for CStringList hence you cannot assign one List to another like you did. You will have to use some alternative method to do this like copying all the elements of one list to the other in a loop. e.g., something like: for(int i=0; ilist.AddTail(str.list.GetAt(i)); } Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off." My Articles
-
i have a problem about overload operator = this is my code CStringList& CTESTADOView::operator =(CStr &str) { this->lst=str.list; return(lst); } : error C2582: 'CStringList' : 'operator =' function is unavailable can anyone tell me where the wrong?? thanks in advance~~~!:laugh::laugh::laugh::laugh: nothing