I don't know why this program goes wrong, because it is simple; however, if I can't use vector
in GMP, the task will be so hard.
This is my code:
vector<mpz_t> elements;
cout << elements.size() << endl;
mpz_t a;
mpz_init(a);
elements.push_back(a);
This works well, but it is not as useful as vector
:
// mpz_t b[10];
// for (int i = 0; i < 10; i++){
// mpz_init(b[i]);
// }