Expand|Select|Wrap|Line Numbers
- struct Foo
- {
- int number;
- };
- int main()
- {
- int i = 14;
- Foo *floo = new Foo[i];
- }
Expand|Select|Wrap|Line Numbers
- void bubble_sort(apvector <int> &array)
- {
- int i, j, flag = 1;
- int temp;
- int arrayLength = array.length( );
- for(i = 1; (i <= arrayLength) && flag; i++)
- {
- flag = 0;
- for (j=0; j < (arrayLength -1); j++)
- {
- if (array[j+1] > array[j])
- {
- temp = array[j];
- array[j] = array[j+1];
- array[j+1] = temp;
- flag = 1;
- }
- }
- }
- }
Also, I don't want to rearrange them sorted (like in the code above) but put them sorted into another array.