For my project I have to sort 5 numbers and 5 names using a template bubble sort. I have one header for the numbers, and one for the names. This is what I have so far for my testing page:
Can someone please help me out? I have to create a template to look like this: template<>....with a class inside the arrows. Then, I have to use bubble sort to sort the 5 names and number objects I have created. Can I please get help with sorting the names and numbers and also using templates? Any help would be greatly appreciated! Thanks so much.
A Bubble Sort would be implemented as a function that operates on an array of numbers in your case.
Write the code that handles doubles, then you can think about abstracting the type from what you've written. Bit so far, I see no array and I see no sort function.