Look here:
this->Number = new int[this->VectorSize];
int location = this->VectorSize;
Assume for argument's sake that this->VectorSize
== 10. So location
now has the value 10. However, later you do this in a loop:
while (location)
{
//...
this->Number[location--] = aux; // out of bounds!
}
You are accessing this->Number[10]. That is a memory overwrite. And no, location doesn't get decremented before it's used, as it is post-decrement, not pre-decrement.
When you compile a program on another compiler and then run the program, if that runtime detects errors, always question your code. It doesn't matter if it "worked" on compiler X, or if it worked on your computer and your friend's computer but not the teacher or customer's computer. Always suspect there is something wrong with your code if there is a failure such as memory corruption.