WOW!
Brad0407, you are brilliant!
Thank you very much for your help.
It was pure genius.
Also, to all the others that helped, thank you!
does anyone see a problem with my += operator from my previous posts. Ill provide the code again. Right now the problem is that it when it adds the contents of the right hand operand to the left hand operand it outputs -842150451 as the array contents.
Code:IntArray& IntArray::operator+= (IntArray& add) { CreateArray(add.size); for(int k = add.low(); k<= add.high() ; k++) parray[k] += add.parray[k]; return *this; }
Problems:
- You don't check to see that the arrays are the same size.
- They may not have the same start and finish point so you should not go from low() to high() but from 0 to size.
- You shouldn't be recreating the array with CreateArray()
- I'm awake right now
Don't quote me on that... ...seriously