- #1
discoverer02
- 138
- 1
I'm not sure that this post belongs here, but I'll give it a try. I'm having a devil of a time trying to figure out why my program won't work.
The assignment was to create and array class consisting of:
A constructor that takes and integer for the size of the array
A constructor that takes 2 integers, one for the first index and one for the last index
A copy constructor
Overload []
We were then supposed to pass array objects to a quicksort and mergesort function that came right out of our textbook.
The quicksort function is working just fine with my array class, but the mergesort only works for arrays up to three items. If I try to pass an array object of length 4 or greater the merge function fails.
I've spent hours trying to debug to no avail. The program was created in MS Visual Studio.NET 2003
I'd really appreciate it if a programmer could take a look at it and fill me in on where I went wrong.
Thanks for the help
discoverer02
The assignment was to create and array class consisting of:
A constructor that takes and integer for the size of the array
A constructor that takes 2 integers, one for the first index and one for the last index
A copy constructor
Overload []
We were then supposed to pass array objects to a quicksort and mergesort function that came right out of our textbook.
The quicksort function is working just fine with my array class, but the mergesort only works for arrays up to three items. If I try to pass an array object of length 4 or greater the merge function fails.
I've spent hours trying to debug to no avail. The program was created in MS Visual Studio.NET 2003
I'd really appreciate it if a programmer could take a look at it and fill me in on where I went wrong.
Thanks for the help
discoverer02
Attachments
Last edited: