Three arrays:
Was trying to repurpose my display template call, and sort gives me compiler errors.
Assignment wants me to display using template above (done) but then display again using standard sort and I cannot get it to work. Any help is appreciated.
Code:
int a[6] = { 44, 55 , 22, 88, 33, 11 };
std::string months[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
char vowels[5] = { 'E','U','I', 'A', 'O'};
Was trying to repurpose my display template call, and sort gives me compiler errors.
Code:
template <typename T, size_t size>
void displayArray(const T(&array)[size])
{
for (size_t i = 0; i < size; ++i)
std::cout << array[i] << " " << std::endl;;
}
Assignment wants me to display using template above (done) but then display again using standard sort and I cannot get it to work. Any help is appreciated.