BubbleSort question

Hi there,

I have an assignment to do with BubbleSort. This particular section of the assignment asks me to create a doBubbleSort method in my ArraySorter class. The method body should call another function(function will swap array elements if less than the next element) 'n' amount of times, where n is the size of our array. If I need to do something 'n' amount of times, what C++ feature do I use?

Thank you in advance for any help! It is greatly appreciated!

flyingEagle
check out the for, while, do loops
A loop. A for loop would be recommended as you know exactly how many times you want to iterate.
Topic archived. No new replies allowed.