title: Getting weird characters from printing dynamic int array from pointer
body: <p>Like the title says, I've been trying to print elements of an array dynamically allocated which is assigned to a pointer.  From there I've tried to get it to print out the elements of the array after some elements are added, but I get very strange characters which aren't even ints.  Here is some code.</p>
  
  <pre><code>//QS.h
  class QS: public QSInterface { //where the pointer is declared 
  private:
  int* quickSort;
  
  //QS.cpp
  
  bool QS::createArray(int capacity) {  //where the array is created
  if (quickSort != NULL) {
      //delete [] quickSort;
  }
  quickSort = new int[capacity];
  arrayCap = capacity;
  arraySize = 0;
  return true;
  }
  
  bool QS::addToArray(int value) { //elements are added
  if (arraySize &gt;= arrayCap) {
      return false;
  }
  quickSort = &amp;value;
  ++arraySize;
  return true;
  
  }
  
  string QS::getArray() const {  //where array is "printed"
  string array;
  for (unsigned int i = 0; i &lt; arraySize; ++i) {
      array += *quickSort + i;
      array += ", ";
  }
  return array;
  }
  </code></pre>
  
  <p>Output I receive are just nonsensical ASCII characters,not memory addresses.  I think I may have messed up when adding to the array.  Any help? Thanks</p>
  
  <p>Note *I "have" to use an array, but perhaps in some other world a vector would be nicer</p>