I don't understand why this won't sort it properly?

Code:
template<class T>
class Prob2Sort
{
	private:
		int *index;                                 //Index that is utilized in the sort
	public:
		Prob2Sort(){index=NULL;};                   //Constructor
		~Prob2Sort(){delete []index;};              //Destructor
		T * sortArray(const T*,int,bool);           //Sorts a single column array
		T * sortArray(const T*,int,int,int,bool);   //Sorts a 2 dimensional array
}; 



template <class T>
T * Prob2Sort<T>::sortArray(const T* a,int ind1,int ind2,int col,bool ord)
{
    index=new int[ind1];
    T *sorted;
    for(int i=0; i<ind1; i++)
    {
        index[i]=i;
    }


    if (ord==false)
    {
        for(int i=0;i<ind1;i++)
        {
            for(int j=0;j<ind1;j++)
            {
                if(a[index[i]*col]>a[index[j]*col])
                {
                    index[i]=index[i]^index[j];
                    index[j]=index[i]^index[j];
                    index[i]=index[i]^index[j];
                }
            }
        }
    }
    if (ord==true)
    {
        for(int i=0;i<ind1;i++)
        {
            for(int j=0;j<ind1;j++)
            {
                if(a[index[i]*col]<a[index[j]*col])
                {
                    index[i]=index[i]^index[j];
                    index[j]=index[i]^index[j];
                    index[i]=index[i]^index[j];
                }
            }
        }
    }

    sorted= new T[ind1*ind2];
    for(int i=0; i<ind1; i++)
    {
        for(int j=0; j<ind2; j++)
        {
            sorted[i*ind2+j]=a[index[i]*ind2+j];
        }
    }
    return sorted;
}

int main()
{
  	cout<<"The start of Problem 2, the sorting problem"<<endl;
	Prob2Sort<char> rc;
	bool ascending=true;
	ifstream infile;
	infile.open("Problem2.txt",ios::in);
	char *ch2=new char[10*16];
	char *ch2p=ch2;
	while(infile.get(*ch2)){cout<<*ch2;ch2++;}
	infile.close();
	cout<<endl;

	cout<<"Sorting on which column"<<endl;
	int column;
	cin>>column;
	cout<<endl;
	char *zc=rc.sortArray(ch2p,10,16,column,ascending);
	for(int i=0;i<10;i++)
	{
		for(int j=0;j<16;j++)
		{
			cout<<zc[i*16+j];
		}
	}
	delete []zc;
	cout<<endl;
        return 0;

}
this is my output

The start of Problem 2, the sorting problem
Lcekoeddhoffbmg
Lkcmggjcdhhglif
Cgldjhcekjigcdd
Cgldjhcekjigcdn
Bffmdbkcenlafjk
Fggdijijegfblln
Jjlncnimjldfedj
Amliglfohajcdmm
Balgfcaelhfkgeb
Kmlhmhcddfoeilc

Sorting on column
15

Lcekoeddhoffbmg
Lkcmggjcdhhglif
Cgldjhcekjigcdd
Cgldjhcekjigcdn
Bffmdbkcenlafjk
Fggdijijegfblln
Jjlncnimjldfedj
Amliglfohajcdmm
Balgfcaelhfkgeb
Kmlhmhcddfoeilc

it should be sorting according to column 15 and look like this
Cgldjhcekjigcdn
Fggdijijegfblln
Amliglfohajcdmm
Bffmdbkcenlafjk
Jjlncnimjldfedj
Lcekoeddhoffbmg
Lkcmggjcdhhglif
Cgldjhcekjigcdd
Kmlhmhcddfoeilc
Balgfcaelhfkgeb