I need some help figuring something out for an assignment.
The assignment is basically about creating a editing program to edit a single char string on the console, everything has been coded and works without a hitch except for one part.
I can only display a certain number of elements at a time and need to be able to scroll through the array, I have coded the scrolling part ie. moving the cursor forward one element when the right arrow key is press and moving back one element when the left arrow key is pressed.
My problem is I am not sure how to display a limited number or character and still scroll through the whole array with out creating a smaller array and copying the displayable characters and displaying that on the screen.
I don't need source code just a hint or tip is perfect.