Thanks but no luck. The closest i'm getting is with one error. It doesn't recognize the .state part of populationArray.state. This is a struct array with elements inside the struct of course. Nothing is recognizing the elements in a sort. Once again, I appreciate your help I'm just a C# programmer not a C++ programmer. Now I've had to switch languages and its throwing me off.
I've tried Bubble Sorts and Selection sorts and even the a/b sort in the previous post to no avail.
int compare (data item1, data item2)
// returns -1 if item1 is "before" item2
// returns 0 if item1 and item2 have "equal" value regarding ordering
// returns 1 if item2 is "before" item1
// You'll have to decide the criteria for "equal" and "before"
void swap (data& item1, data& item2)
// swap values of each struct element of data1 and data2.
Then just do a bubble sort on the array like you would with a primitive type like an integer, only use these functions.
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 ...