c++ - Using vectors with GMP -


i'm trying use vectors gmp. when compile this, "[...]\bits\vector.tcc [error] array must initialized brace-enclosed initializer". data structure dynamic size works - deque best had more errors popping when tried that. how make stop failing?

#include <vector> #include <gmp.h>  int main(){ mpz_t test; mpz_init(test); std::vector<mpz_t> a_vector; a_vector.push_back(test); return 0; } 

since gmp numbers not directly assignable (in other words, can't mpz_t test = 0;' ormpz_t test1l; test1 = test;`, don't believe can used in standard c++ container types.

if want that, may want use c++ interface gmp instead: https://gmplib.org/manual/c_002b_002b-interface-general.html


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -