I have written a template function which takes int32, bool and int16 as an input. However for bool, I am getting this warning. Any ideas, how can I resolve it.
template<class T>
void GameControl::assignValues(char *gaff, T &output)
{
output = T(atoi(gaff));
}
The function calls are as follows:
int32 intout;
assignValues("1234", intout);
bool boolout;
assignValues("1234", boolout);
can anyone tell, how to get rid of the warning?
EDIT: This worked, but not sure of the consequences. I just suppressed the warning.
#pragma warning( push )
#pragma warning( disable : 4101)
// Your function
#pragma warning( pop )