|
| lazyrussian (7) | |||||
| Hiya, I was wondering how I would go about converting a vector to a string array? Would the following be proper:
or do I have to allot a certain amount of space/memory for scr before I fill the array?
or something like that? (Pretend for a moment that my vector has already been initialized with values) Thanks. | |||||
| Mitsakos (343) | |||
| I think you can not do the first method because the vector is a container that contains string which is also a container... You can only do your first example between vectors. You can do it by your second but you can not declare the size of scr[] array like that. You have to do it at runtime. So you have to use pointer to string.
Hope this helps | |||
Last edited on | |||
| firedraco (2606) | |
| Lolz Mistsakos got it before me! Btw, thanks for code tags actually. | |
Last edited on | |
This topic is archived - New replies not allowed.
