OK, I've been looking at templates recently and eveything was fine...never had a problem with them at any point. But then when I decided to write a function that would either return the given template type or not. the following code explains what I mean.
template <class T>
T find(char x, T array[]){
string str = "hello";
for(int i = 0; i < str.length(); i++){
if(x == str[i]) return array[i];
}
// if it's not I need to return something...but what?
}
I hope that makes sense all thanks
Chris