I am using the GMP multiple precison package.
I need to input very large integers as strings, for example
will set x to that large integer in quotes (10 gives the base.)
I want to be able to have the user enter the value, so I did something like:
but this causes g++ to give the following error:
#include <gmpxx.h> // GMP
std::cin >> num;
error: cannot convert `std::string' to `const char*' for argument `2' to `int __gmpz_init_set_str(__mpz_struct*, const char*, int)'
Any ideas how to input a data type that will work?
I am using Ubuntu on an AMD64.