Hi, I'm a beginner in c++ and I need a library that can handle really large integers. I saw on Internet that the best library to perform this task is ttmath. I´ve downloaded it, but i´ve no idea how to install it. Anyone can help me? I use windows vista and mingw.I really need help.
Thanks in advance.
don't know how to install ttmath myself
but i suggest you check out full fledge IDEs like
1) MS Visual C++ 2010/1012 Express
2) Code::Block or Code::lite
i have heard they offer good support for libraries and other stuff
ultimately google is best companion ....... just Google it
I only had a quick glance at ttmath, but it looks like you just need to configure the compiler so that it knows which directory to look in when trying to locate the file which you are including.
In code::blocks, menu:
Settings->compiler->search directories
add the path to the ttmath files.
Then, in your code, you simply need to put #include "ttmath.h" at the start of your code. If that compiles, you can go ahead and use the library to do something useful - start with the samples provided in the ttmath documentation.
yes, i've downloaded "boost_1_54_0.zip" and extracted it. Now, how can i install it? I'm really a beginner. I use windows vista, code blocks as an ide and gnu gcc as a compiler.
Thanks in advance.
By the way, it is sometimes worth to select different instrument for specific task. If you need this only for occasion, it would be much better to switch temporarily to Python or Java which have support for large numbers packed in.
At the same time if you need some simple calculations on big numbers, you can easily write necessary procedures on arrays from scratch.
I've done as you said. I added C:\Users\utilizador\Desktop\boost_1_54_0 to the compiler search path from within the CodeBlocks IDE and I also added C:\Users\utilizador\Desktop\boost_1_54_0 as a link library, so that I don´t get an error message stating "undefined reference" when I try compile a sample of boost multiprecision.
But then, when I try to compile, I get an error message saying:
"cannot find C:\Users\utilizador\Desktop\boost_1_54_0: Permission denied".
Do you know what's wrong?
Thanks in advance.
I never managed to compile a sample of boost multiprecision. Every time I try it, I get lots of errors.
For example, when I tried to compile the example you showed I got 4 errors about "bigint".
One of them was for example:"'bigint' has not been declared".
Do you know why this happens?