> It works because each character contains a value
It works because you assume the the character set is contiguous, and is basically US-ASCII
Read about http://en.wikipedia.org/wiki/EBCDIC
Then read about locales.
Using toupper() etc will hide the locale and encoding details from you.
> char *str = new char[strlen(text)];
You also forgot to allocate space for the \0 at the end.
> It works because you assume the the character set is contiguous, and is basically US-ASCII
Or Unicode, and Unicode is the future of character sets. Edward definitely recommends toupper, but when was the last time you worked on an IBM mainframe? ;)
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 ...