Hello, so I have attempted at this code for a while but I still can't get it working, I'm using Cengage, the question is
"Programming Exercise 11 in Chapter 8 explains how to add large integers using arrays. However, in that exercise, the program could add only integers of, at most, 20 digits. This chapter explains how to work with dynamic integers. Design a class named largeIntegers such that an object of this class can store an integer of any number of digits. Add operations to add, subtract, multiply, and compare integers stored in two objects. Also add constructors to properly initialize objects and functions to set, retrieve, and print the values of objects. Write a program to test your class."
There are three systems "largeIntegers.cpp", "largeIntegers.h", and "main.cpp" they all need to have code in them to work so this is what I have so far.
largeInteger.cpp
#include <iostream>
#include <string>
#include "largeIntegers.h"
how annoying this is comes down to how you store the values.
if you use say base 10, 15 digits per chunk shoved into a container of 64 bit ints
and it can be useful to store the numbers in reverse so [0] and [0] represent the same thing and when you hit size() of either number add carry once and copy down the rest.
its much more efficient to use the entire 64 bit int and a non base 10 approach rather than a simple base 10 approach but for debugging and understanding that is a good starting point.