I'll try to keep it brief. When I try to pass the 'list' vector to the counter function my compiler throws an error of: "error: request for member size in count, which is of non-class type std::vector<int>*"
Googling hasn't produced anything quite what I'm looking for syntax wise. If someone could enlighten me I'd be most appreciative.
My compiler is g++ version 4.6.3.
#include <iostream>
#include <vector>
using namespace std;
void counter(vector<int> count[]);
int main (){
vector<int> list[5];
counter(list);
return 0;
}
void counter(vector<int> count[]){
int i, j=0;
for(i = 0; i <= count.size(); i++){
j++;
}
cout << "There are " << j << " elements.\n";
}