MoMaFuckEup wrote:
> Hello,
> am writing program that requires sorting.am using an array error[5].the 
> array contain values(numbers),i want a program to sort the smallest 
> value to error[1]and the smaller one to be in error[2].....
> please help me

size_t x, y;
int error[] = {15, 7, 9, 1, 10};
Block<int> sorterror(error, sizeof(error) / sizeof(int));

sorterror.Sort();

y = sorterror.GetSize();
for (x = 0; x < y; x++)  printf("%i\n", sorterror[x]);

(<grin>  That's what you get for not specifying C, C++, Safe C++)

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* VerifyMyPC 2.1
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.

Free for personal use, $10 otherwise.
http://www.CubicleSoft.com/VerifyMyPC/

Reply via email to