Is there any way to know what type of data the variable is? Something like:
1 2 3
template <class T> void whatType(T data) {
cout << "I am a " << //...
}
Know what I mean? If the function was passed an int, it would say "I am an int", or something along those lines. The computer knows what type it is, how can I?