title: Using dynamic arrays to store large integers
body: <p>Instructions are:</p>
  
  <p>The largest value   that    an  int variable    can handle  is  2147483647. Make a class
  called largeInteger that uses a dynamic array to store an integer of any amount of
  digits.
      provide an input() function to take the input of a large integer from cin.
      provide an print() function to display a large integer to cout.
      provide an add() function to add two large integers and return the sum as a
      large integer</p>
  
  <p>So far, I've had issues with inputting and passing values between functions, as my grasp of c++ syntax is awfully limited. Any assistance would be greatly appreciated. Here is my current code, riddled with problems.</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  class largeInteger {
    public:
           // Takes input of a large integer from cin
           largeInteger = input();
           // displays large integer to cout
           void print(int largeInteger);
           // adds two large integers and returns the sum as a large integer
           void add();
  };
  
  int * input () {
   int * input;
   input = new int;
   cout &lt;&lt; "Please enter a large integer: ";
   cin &gt;&gt; input;
   return input;
  }
  
  void print (largeInteger) {
   cout &lt;&lt; "The entered large integer is: " &lt;&lt; largeInteger;
  }
  
  void add (largeInteger) {
   int * sum;
   sum = new int;
   sum = largeInteger + largeInteger;
   cout &lt;&lt; "The sum of the two large integers is: " &lt;&lt; largeInteger;
   delete sum;
  }
  
  int main(int argc, char *argv[]) {
  int * largeInteger;
  largeInteger = new int;
  system("PAUSE");
  delete largeInteger;
  return EXIT_SUCCESS;
  }
  </code></pre>