我正在使用BigInteger庫。但是,當從字符串轉換爲BigInteger時,我會調用錯誤「調用BigInteger時沒有匹配函數(字符串&)」。將字符串轉換爲C++中的BigInteger
如何從兩者之間轉換而不引發錯誤?
這裏是我的代碼SNIPPIT:
#include "BigIntegerLibrary.hh"
str1=randomStrGen(1);
str2=randomStrGen(1);
BigInteger s1 = new BigInteger(str1);
BigInteger s2 = new BigInteger(str2);
的BigInteger庫從https://mattmccutchen.net/bigint/下載,
2010.04.30發佈
您正在使用哪個BigInteger庫?鏈接到下載網站?你在哪裏包括陳述? –
您正在使用的庫沒有'BigInteger'構造函數,它接受'字符串' – CinCout
@DougCoburn剛剛添加版本信息 – Dave