samedi 2 février 2019

Multiplying twov large number in c++

I was simply trying to find the square of a number of order 10^18. But that go beyond long long int range. How can I such large number in c++. I tried to use boost library and tried it on ideone but I was facing such error.

Code link : https://ideone.com/C3XUTQ

Error:

Compilation error   #stdin compilation error #stdout 0s 0KB
prog.cpp:1:10: fatal error: 'boost/multiprecision/cpp_int.hpp' file not 
found
#include <boost/multiprecision/cpp_int.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Aucun commentaire:

Enregistrer un commentaire