"how to implement big int in c++" Code Answer

2

things to consider for a big int class:

  1. mathematical operators: +, -, /, *, % don't forget that your class may be on either side of the operator, that the operators can be chained, that one of the operands could be an int, float, double, etc.

  2. i/o operators: >>, << this is where you figure out how to properly create your class from user input, and how to format it for output as well.

  3. conversions/casts: figure out what types/classes your big int class should be convertible to, and how to properly handle the conversion. a quick list would include double and float, and may include int (with proper bounds checking) and complex (assuming it can handle the range).

By vigamage on July 17 2022

Answers related to “how to implement big int in c++”

Only authorized users can answer the Search term. Please sign in first, or register a free account.