i want to sort the richtextbox array with respect to x and y , i dont know how to do? please help
this is a simple programming task (sounds like homework).
1. UpdateData the contents of the richeditcontrol to a string variable of the control
2. extract all lines to an integer (x,y)-array (e.g. while-loop, ipos=find(","), v.x=atoi(left(ipos), v.y=atoi(mid(ipos+1), append v to array a)
3. sort array as desired
4. generate string of array (e.g. for-loop, sz+=tostring(a[i].x) + "," + tostring(a[i].y) + "\r\n" )
5. output this string to the richeditcontrol
When you have problems with your code, you can ask (show the code that makes problems) and we will try to help you.
10 people are following this question.