0

My friend was asked the question below in an interview and asked for my help post-interview. The question is bugging me as well, because I have no idea. Can someone please elaborate?

Create a class to store a number limited in size only by the total amount of memory available on the system

  • The most straightforward way is to store decimal digits inside `std::vector`. – Evg Dec 13 '19 at 17:34
  • Use one of these big math libraries: [https://gmplib.org/](https://gmplib.org/) or [https://www.boost.org/doc/libs/1_71_0/libs/multiprecision/doc/html/index.html](https://www.boost.org/doc/libs/1_71_0/libs/multiprecision/doc/html/index.html) – drescherjm Dec 13 '19 at 17:35
  • If you want to design your own big math library, a simple way is to use a string of digits and grade school math rules. – drescherjm Dec 13 '19 at 17:37

0 Answers0