suggests that operator+ is a member function. The name of the class, String , suggests that operator+ is probably being used for concatenation. The fact that the function has one argument rather than two suggests that it is probably a member function rather than a standalone function. Using a member function for concatenation is a bad idea because it requires the left operand of a concatenation to be a String rather than a type that can be converted to String .
Moreover, the lack of const in the member-function declaration (if, indeed it is a member function) means that you cannot use a const String object as the left operand.
That's two elementary programming errors in that one example. If you saw that example in a textbook, it may be a good idea to consider a different textbook.
int String::CompareNoCase(const String& pData)
int nIndex = 0; // for increment the position
int nLen = 0; // for store length
// if string is null
if(pData.m_pText != NULL)
// length of string
nLen = (int) strlen(pData.m_pText);
// check operand string is less or not
if(m_nLength < nLen)
else if(m_nLength > nLen)
// for check equality
for(nIndex = 0; nIndex < m_nLength; nIndex++)
// check char is equl or not
if(toupper(m_pText[nIndex]) != toupper(pData.m_pText[nIndex]))
if(int(m_pText[nIndex]) > int(pData.m_pText[nIndex]))
// if operand string is less then parameter string return -1
// return if strings are equal
How can i create lexicographical comparison function for string?
what modification i want to do in this function?
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...