I have a class called File with the following method:
I call the method as follows:
template <class T>
bool File::writeBytes(T *obj)
if(fwrite(obj, sizeof(T), 1, file) < 1)
But I get the following error when compiling:
f.a = 4545;
f.b = "32453452354";
/usr/people/cs/student/ymalik/axesone/main.cc:30: undefined reference to `bool File::writeBytes<foo>(foo*)'
But I do have it since the method is templated. Can someone please tell me what is wrong?