I'm trying to build my first template function, but it generates a compile error when lines 21 and 22 are not commented.
What I'm trying to do is to have a template function that can return multiset<int>, multiset<double> or multiset<string> depending on the attribute I want to extracto from the vector.
Each element of vector has several member names of Voice.
Please see:
Can I build such a template?
The broader problem is this:
I have a database where there are several tables, each with dozens of fields and I want to build a clustering algorithm.
The first step, the one I'm trying to accomplish is to create a multiset of each attribute so that I can build bins and count frequencies of elements for each bin, for chosen attributes.
I'd appreciate any ideas on this, so that I don't have to code many repetitive tasks.