Question: Given big_num.h and big_num_driver.cpp implement, replace the vectors with a linked list . Also dont forget to write a copy constructor, operator = and destructor
Given big_num.h and big_num_driver.cpp implement, replace the vectors with a linked list .
Also dont forget to write a copy constructor, operator = and destructor for the big_num class.

//big_num_driver
#include
#include
#include
#include "big_num.h"
int main() {
std::string str;
std::cout
getline(std::cin,str);
big_num x(str);
std::cout
getline(std::cin,str);
big_num y(str);
big_num result = (x+y);
std::cout
std::cout
return 0;
}
//big_num.h
#ifndef BIGNUM_H #define BIGNUM_H #include #include #include #include
class big_num { public: big_num(std::string); friend std::ostream& operator
big_num::big_num(std::string str) { // for(int i = 0; i 0; i--) { digits.push_back(str[i] - 48); } }
big_num operator + (big_num& x, big_num& y) { return x+y; }
std::ostream& operator -1; i--) { outputStream
#endif
USE C++
Given big_num.h and big_num_driver.cpp implement, the big_num class so that the main in big_num_driver.cpp will work. Do not change the main it is good. see examples vocstartsoft:-/environment/Lab6 $ ./BigNum Enter a number: 98347901287 Enter a number: 38120383 98347901287 + 38120383 = 98386021670 vocstartsoft:-/environment/Lab6 $ ./BigNum Enter a number: 99999 Enter a number: 1 99999 + 1 = 100000 vocstartsoft:~/environment/Lab6 $ ./BigNum Enter a number: 321 Enter a number: 82344234789 321 + 82344234789 = 82344235110 vocstartsoft:-/environment/Labs $ Il When you are finished submit you big num.h file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
