whoops i posted the wrong instantiation code, hehe the one i posted won't work of course! so here's the correct one :
point <int> myPoint (int x, int y);
as already said the compiler treats this instantiation as function prototype and not as instantiation!! ;(
myPoint is an attribute of...
whoops, i posted the wrong instantiation code! ;)
allright, i will post my standard constructor declaration code first, this might be helpful :
// standard constructor point.h template
// 'type' is the generic template parameter
point (type x, type y);
// and this is the right instantiation...
hello,
i have a simple 'point'-template class with 2 parameter standard constructor! i wanna instantiate like this :
point<unsigned int> myPoint (x = 0, y = 0);
the compiler (vc++ 6 sp5) thinks 'myPoint' is a function with 2 parameters returning point<unsigned int> instead of a point...
hello,
i have a simple 'point'-template class with 2 parameter standard constructor! i wanna instantiate like this :
point<unsigned int> myPoint (x = 0, y = 0);
the compiler (vc++ 6 sp5) thinks 'myPoint' is a function with 2 parameters returning point<unsigned int> instead of a point...
hallo,
ich hoffe das problem wurde net scho 1000x mal diskutiert, konnte aber im archive und web keine brauchbare antwort finden!
zum problem: ich habe ein simples template, was auch ohne probleme compiliert, sobald ich aber das template in z.b. main instantiiere steigt der linker mit...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.