underSt8ment
Programmer
Hello all,
I hope this thread matches in here.
I'm working in Visual c++ 6.0.
I am trying to create a vector that will be used as a buffer for an algorithm. The problem is that I want the algorithm to work on a "template" type vector.
Therefore, my buffer vector must be created at run time with the type of the vector supplied as input.
(for example, say the input vector is "vector<int> data"
the buffer should be created as type integer)
I found a way to obtain the type using type_info:
from MSDN
("The type_info::raw_name member function returns a const char* to a null-terminated string representing the decorated name of the object type."
ok, so now I have the data type stored in a string.
My question is how to use this string to create the correct type of buffer vector ?
Thanks !
I hope this thread matches in here.
I'm working in Visual c++ 6.0.
I am trying to create a vector that will be used as a buffer for an algorithm. The problem is that I want the algorithm to work on a "template" type vector.
Therefore, my buffer vector must be created at run time with the type of the vector supplied as input.
(for example, say the input vector is "vector<int> data"
the buffer should be created as type integer)
I found a way to obtain the type using type_info:
from MSDN
("The type_info::raw_name member function returns a const char* to a null-terminated string representing the decorated name of the object type."
ok, so now I have the data type stored in a string.
My question is how to use this string to create the correct type of buffer vector ?
Thanks !