sorting a dynamic 2d array?

Hello, so I have a code to finally create a user designated dynamic 2d array that is filled with random uppercase letters. However, I cannot figure out a way to sort these this array in alphabetical order. I keep seeing char to char* errors and time function errors. Can somebody please lend some assistance.

here is a chunk of my code so far...


void fill(int, int);



int main()
{
int range, width;







cout << "Please enter a number between 2 and 10: ";
cin >> range;
cout << endl << endl;

while (range < 2 || range>10) //validating correct integer
{
cout << "Please enter a number within bounds: ";
cin.clear();
cin.ignore(100, '\n');

while (!(cin >> range)) //validating correct data type
{
cout << "Please enter a number within bounds: ";
cin.clear();
cin.ignore(100, '\n');
}
}

cout << "good now what?\n\n\n"; //DELETE


width = range;

cout << "array attempt\n\n\n\n\n"; //DELETE




fill(range, width);
system("PAUSE");







return 0;
}


void fill( int row, int col)
{

char **arralpha;
arralpha = new char*[row];
for (int i = 0; i < row; i++)
arralpha[i] = new char[col];



srand(time(NULL));

for (int i = 0; i < row; i++)
{

for (int j = 0; j < col; j++)
{
arralpha[i][j] = rand() % 26 + 'A';
cout << arralpha[i][j] << " ";

}
cout << endl;



}

cout << endl << "hopeful" << endl;




return;
}
please use code tags and indentation.
Topic archived. No new replies allowed.