Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 // Time utilities

#include // Limits

#include // Limits

#include // Limits

#include // Assertions

#include // Exceptions

#include // Char type data

#include // C++ String class

#include // Math routines

#include // Standard streams

#include // File streams

#include // String streams

#include // Formatting

#include // Regular expressions

// 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 // String streams

#include // Formatting

#include // Regular expressions

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:

image text in transcribed

[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 [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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Evaluate the integral. 1 (2 x' + 4x? + .3 .2 x + x?

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago