Question
C++ Program Create the bigint.cpp file needed to implement the Bigint class defined in bigint.h File Name: main.h // System Libraries #include // Time utilities
C++ Program
Create the bigint.cpp file needed to implement the Bigint class defined in bigint.h
File Name: main.h
// System Libraries
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// Project Libraries
#include "bigint.h"
// Function Declarations
int main(int, char**); // Main function
File Name: main.cpp
#include "main.h" // header file for this module
// Function Definitions
int main(int argc, char **argv)
{
// We'll start with a compile stamp just to show a bit of the compiler macros
std::cout
;
// Local variables
Bigint var_a, var_b;
// Input
std::cout
std::cin >> var_a >> var_b;
// Display result
std::cout
// All done
return 0;
}
#include
#include
#include
file name: bigint.cpp
class Bigint
{
public:
// Six Pack
Bigint(); // Default Constructor
Bigint(std::string); // Parm constructur
Bigint(const Bigint &); // Copy Constructor
Bigint(Bigint &&); // Move Constructor
Bigint & operator = (const Bigint &); // Copy assignment
Bigint & operator = (Bigint &&); // Move Assignment
~Bigint(); // Destructor
// Input and output
friend std::ostream & operator
friend std::istream & operator >> (std::istream &, Bigint &);
// Relational
friend bool operator
friend bool operator == (const Bigint &, const Bigint &);
friend bool operator != (const Bigint & left, const Bigint & right) { return !(left == right); }
// Arithmetic
Bigint & operator ++ (); // Pre-increment
Bigint operator ++ (int); // Post-increment
Bigint operator + (Bigint) const; // Addition
private:
std::string value;
std::string add(std::string, std::string) const;
};
Create the bigint.cpp file needed to implement the Bigint class defined in bigint.h
sample output:
[File main.cPP compers on a Tine: 99999999999999999999999990 using GNU CCC 7.2.0 with 32 bit integers] Enter two big integers on a line um of 999999999999999999999999999999999999999 9999999999999999999999999999999999999 100000000 0o0000000000000000000 999999 100000000 1 000000000000o000000999999
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started