I have this code:It prints "Size of dod is 4.", the size of a pointer. I wanted the template was instantiated with type char[8], not char*. Is it possible? I am using Gcc 3Code:#include <iostream> using namespace std; template <typename A> void doodle(A dod) { cout << "Size of dod is " << sizeof(dod) << "." << endl; } int main() { char dod[8]; doodle(dod); cin.get(); return 0; }
Thanks any help