GMP Library Issue

I don't where to post this so kindly forgive me for posting on this
forum. I have create a mpz_t array and i want to sort this. Using c++
sort function generates lot of errors and i searched on net but did
not get anything useful. Kindly tell me how to sort the array.
using namespace std;
mpz_t ret_1;
int v[42];
mpz_t v_l[2097160],v_r[2097160];
void _prime()
bool p[190];
memset(p,0,sizeof p);
for(int i=2;i*i<190;i++)
if(!p[i]) for(int j=i*i;j<190;j+=i) p[j]=1;
int cnt=0;
for(int i=2;i<190;i++) if(!p[i])cout<<i<<" ",v[cnt++]=i;
for(int i=0;i<cnt;i++) mpz_mul_ui(ret_1,ret_1,v[i]);
int main()
//i have generated prime
mpz_t t_1,t_2;
int cnt=0;
for(int i=0;i<(1<<21);i++)
for(int j=0;j<21;j++)
for(int i=100000;i<100010;i++) gmp_printf("%Zd %Zd
//sort(v_l,v_l+cnt);//creates error


Relevant Pages

  • A Fast sorting algorithm for almost sorted data
    ... which I am currently calling Run sort. ... entire selected run can be added to the sorted output array. ... public class RunSort implements Comparator ... public static void sort(Comparable a, int start,int end) ...
  • Re: resize JTable
    ... >able to easily sort the data, from a user point of view. ... public static final int DESCENDING = -1; ... private Comparator comparator; ... * @param model OrderedTableModel to be kept deduped/sorted. ...
  • Re: qsort returning index
    ... However if you have salaries in a parallel array, ... just to do the sort. ... int *qsortindex(void *buf, int N, int size, int (*compfunc)(const void ...
  • Re: problem with array
    ... > different sort algorythms. ... > the sort the array elements are compared and swapped. ... void selectionsort(void *base, size_t n, size_t size, ... void PrintArrays(int *a, int **pa,size_t n); ...
  • Re: max size of ptr array
    ... The problem is that I get a stack overflow error when I do a quick sort ... you'll get a compiler error. ... int main{ ... And since an int requires 4 "bytes" plus the fact that your array is ...