[gameprogrammer] Re: c++ template problem

Thanks.
The problem was that the va_list dous not handle float type.
I need to get the parameter as double and than convert it to float which makes it difficult to implement it as template.

I could not find out yet the problem of the derived vect3 class.

fenor




Matthew Weigel írta:
Felde Norbert wrote:


The c'tor should get the values of the coordinates, but because of the
template parameter N, I do not know
how many parameter the c'tor should get. I tried that:

   Vect<T,N>(T v0, T v1, ...) {
       va_list params;

       V[0] = v0;
       V[1] = v1;

Other people report having success with this kind of code online, e.g.
http://groups.google.com/group/microsoft.public.vc.language/browse_thread/thread/25e1820b7f894bde

As a starting point, why don't you try building and running the code
from that link (without the reference in the constructor) and see if you
have any problems.


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: