All pastes #980642 Raw Edit

Untitled

public cpp v1 · immutable
·published 2008-04-11 04:16 UTC
rendered paste body
#include <iostream>using namespace std;template <class T>void bubbleSort(T num[], T NUMEL){	int i, j, temp, moves = 0;		for ( i = 0; i < (NUMEL - 1); i++)	{		for(j = 1; j < NUMEL; j++)		{			if (num[j] < num[j-1])			{				temp = num[j];				num[j] = num[j-1];				num[j-1] = temp;				moves++;			}		}	}}int main(){	const int NUMEL = 10;	double array[NUMEL];	int nums, i, moves;		cout << "Enter 10 numbers/n";	for (i = 0; i < 10 ; i++ ) 	{		cin>>array [i];	}		bubbleSort(array, NUMEL);  //this is the line giving me the error		cout << "The sorted list, in ascending order, is:\n";	for (i = 0; i < NUMEL; i++)	{		cout << "  " << array[i]<< endl;	}		system("pause");	return 0;}