I want to be able to create a function where I specify a parameter to have both a templated container and a templated element type for that container. Is this possible? I get "error C2988: unrecongnizable template declaration/definition" among others. Here is the function in question.
template<class Iter, class Elem>
void readIntoP(Iter<Elem> aCont){
ifstream ifss("data.dat");
string aString;
int counter = 0;
item tempItem;
while(ifss >> aString){
istringstream iss(aString);
if(counter == 0){
tempItem.name = aString;
}else if(counter == 1){
int aNum = 0;
iss >> aNum;
tempItem.iid = aNum;
}else{
double aNum = 0;
iss >> aNum;
tempItem.value = aNum;
aCont.push_back(tempItem);
counter = -1;
}
++counter;
}
}