Hello everyone. I'm just about finished with my degree and am now taking a Data Structures class. So far, it doesn't make sense to me. I'm seeing code snippets of 100+ lines that I could solve in 10. Hopefully I begin the realize the power of Data Structures soon.
Anyways, I have been 4 terms away from C++ and now they scheduled me back into a C++ class. In short, I'm very rusty.
Besides the fact that this seems like a overexaggerated solution in my opinion, my problem has to be solved this way, instructor orders.
Instructor Skeleton Code:
// Simple display of array from start to finish
// --------------------------------------------
void displayArray(int *arrayStart, //first element of array
int *arrayEnd ) //last element of array
{
int *tmp;
// output label
// ------------
cout << "Original array: ";
// display the array elements from the start to the end
// (two lines of code required).
// ----------------------------------------------------
//CODE NEEDED HERE
//CODE NEEDED HERE
// terminate array display line
// ----------------------------
cout << endl;
}
Essentially, you pass in integer values that are stored in an array and you need to print them all back out once you're finished. Later, I have to reverse them but I'm pretty sure I can figure that out once I get a little boost. How do I loop through the above array? There aren't any global variables that stores the entire array, just the start and finish.
By no way am I asking you to solve my homework. I just need a little nudge in what I'm not seeing.
Thank you so much.
P.S. Do any of you know of any C++ Data Structure Tutoring programs or the like? I haven't had trouble in my programming classes where I needed it but I can see me really needing it for this course.