title: Array adding and set methods
body: <p>I am passing in an array to my class, I am constructing it and then I have the ability to transactions (replaces the array with new data) or add transactions (so if the array is first off size 10 then another 10 are added on to make it have 20 elements, the amount in the array may not always be 20 etc)</p>
  
  <p>the code produces the correct results I am expecting when using the first two methods but not the add transaction method. which does not add another 10 elements as expected</p>
  
  <p>does anyone know what issues they are in my coding?</p>
  
  <p>I am fairly bound by the assignment structure in this one so working with the avaliable structures are ideal.</p>
  
  <pre><code>Transaction* tArray;
  int nTransactions;
  
  Analyser::Analyser(Transaction* transactions, int numTransactions)
  {
      //contructs the array and the amount of transations
      tArray = transactions;
      nTransactions = numTransactions;
  }
  
  void Analyser::setTransactions(Transaction* transactions, int numTransactions)
  {
      //set tArray to new set of transactions
      tArray = transactions;
  }
  
  void Analyser::addTransactions(Transaction* transactions, int numTransactions)
  {
  
      Transaction* newT;
      newT = new Transaction[numTransactions + nTransactions];    
  
      for(int i = 0; i&lt;nTransactions; i++)
      {
          newT[i] = tArray[i];
      }
      for (int j = nTransactions; j&lt;numTransactions + nTransactions; j++ )
      {
          newT[j] = transactions[j-nTransactions];    
      }
      tArray = newT;
   }
  </code></pre>