Codice PHP:
#include <iostream>

using namespace std;

template<class T>
void bubbleSort*array, const int size )
{
   
void swap* const, * const );

   for ( 
int pass 0pass size 1pass++ )

      for ( 
int j 0size 1j++ )

         if ( array[ 
] > array[ ] )
            
swap( &array[ ], &array[ ] );
}

template <class R>
void swap* const element1Ptr* const element2Ptr )
{
   
R hold = *element1Ptr;
   *
element1Ptr = *element2Ptr;
   *
element2Ptr hold;
}

int main()
{
   const 
int arraySize 10;
   
int aarraySize ] = { 2648101289684537 };
   
double barraySize ] = { 2.16.34.28.710.912.689.468.745.137.2 };
   
int i;

   
cout << "Data items in original order\n";

   for ( 
0arraySizei++ )
      
cout << a];

   
bubbleSortaarraySize );          // sort the array
   
cout << "\nData items in ascending order\n";

   for ( 
0arraySizei++ )
      
cout << a];
      
   
cout << "Data items in original order\n";

   for ( 
0arraySizei++ )
      
cout << b];

   
bubbleSortbarraySize );          // sort the array
   
cout << "\nData items in ascending order\n";

   for ( 
0arraySizei++ )
      
cout << b];

   
cout << endl;
   return 
0;

C:\DOCUME~1\federico\IMPOST~1\Temp\ccGuaaaa.o: In function `_tf8_IO_FILE':
//c/docume~1/federico/desktop/untitl~1.cpp(.text$bubbleSort__H1Zi_PX01i_v+0x83): undefined reference to `swap(int *, int *)'
//c/docume~1/federico/desktop/untitl~1.cpp(.text$bubbleSort__H1Zd_PX01i_v+0x88): undefined reference to `swap(double *, double *)'


Come mai mi da questo errore in compilazione?