Importing from an Input of Delphi

Wilhelm Korrengk DerBadejunge at web.de
Sun Mar 27 18:30:23 CEST 2005


Hello,
I don`t really like to load gmp into Delphi as far as it is already linked to 
my library so far.

So I decided to use mpz_set_str(mpz_t, string), which means that I will just 
give it a string of  "number^number"  (99^1 or 32^100 .... )

Anyway my compiler alway tells me:

--------
error: cannot convert `std::string' to `const char*' for argument
   `2' to `int __gmpz_set_str(__mpz_struct*, const char*, int)'
--------

CODE:

-------
bool primcheck_1 ( string x ) {


 mpz_t n;
 mpz_init(n);
 
 mpz_set_str(n, x, 0);

------

I`m sorry but the manual did not help me up that far!

Thanks in adance!
Wilhelm Korrengk


More information about the gmp-discuss mailing list