i need help with a program, that implements the radix sort method.

apvector<int> QueuesToArray(apvector<apqueue<int> >&QA, int numVals)

//step two of radix sort

{

apvector<int>Array(numVals);

int t,count=0;

for(int i=0; i<QA.length(); i++){

for(int j=0; j<QA[i].length();j++){

Array[count]=QA[i].front();

QA[i].dequeue(Array[count]);

count++;

}

}

return Array;

}

i am trying to set the array = the first element in the queue, then deleting that element (QA[i].dequeue(Array[count]); ) so that the second element is now the first. the problem is that the last element in the queue does not get put into the array. how am i supposed to access all the element in an apqueue?

i also need help with this function:

int GetDigit(int number,int k)

//return kth digit of number

but i have no idea how to do this one, can i convert the int to a string?