G
Gernot Frisch
a.h:
----
template <class X> void fkt(const X& x);
a.cpp
-----
template <class X>void fkt(const X& x)
{
printf("good\n");
}
main.cpp
--------
int main(int, char**)
{
fkt<double>(3.5);
}
gives a unresolved external symbol:
void fkt(const double& x);
I think I have to include the implementation of the function in the
header, but it's really lenghty. Is there any option?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
----
template <class X> void fkt(const X& x);
a.cpp
-----
template <class X>void fkt(const X& x)
{
printf("good\n");
}
main.cpp
--------
int main(int, char**)
{
fkt<double>(3.5);
}
gives a unresolved external symbol:
void fkt(const double& x);
I think I have to include the implementation of the function in the
header, but it's really lenghty. Is there any option?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com