Vector to *char
by Luigi Rosso · in Technical Issues · 01/31/2002 (7:11 pm) · 5 replies
Is there any cast I can do to get a vector (array) of characters into a char pointer?
Would the dSprintf function work?
Thanks!
Would the dSprintf function work?
Thanks!
About the author
#2
It's its own class. You can declare a vector of characters, integers, floats...whatever (same way like int myint[10] but those aren't resizeable).
02/01/2002 (2:06 am)
No it's an actual vector type. You can .resize() and .len()It's its own class. You can declare a vector of characters, integers, floats...whatever (same way like int myint[10] but those aren't resizeable).
#3
02/01/2002 (2:18 am)
Then you have to make the conversion yourself, maybe by iterating through the vector to build a string out of it.
#4
char *string = &(*myCharVector.begin());
02/01/2002 (3:09 am)
I found a solution here it is if anyone ever has such a question again:char *string = &(*myCharVector.begin());
Torque Owner Love "hyzen" Florg