Handling large numbers in C++?
问题 What is the best way to handle large numeric inputs in C++ (for example 10^100 )? For algorithms I usually switch over to ruby and I sometimes use strings. Any other good methods? 回答1: It sounds like you're looking for a way to enter Arbitrary Precision numbers. here are two libraries you could use: GMP and MAPM 回答2: Check out The Large Integer Case Study in C++.pdf by Owen Astrachan. I found this file extremely useful with detail introduction and code implementation. It doesn't use any 3rd