I'm using a new book this semester for my datastructures class and apart from the bad writing, he has come pretty confusing exercise questions.

I do not need code, just to know what he is referring to.

Write a template function count that returns the number of occurrences of value in the array a[0:n-1].

I don't understand the a[0:n-1]. I'm thinking thats the init/end conditions of the for loop but I just want to make sure.

I think he's just implying that the array a is of n length.

a[0] would be the first and a[n-1] the last slot in the array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.