Originally Posted by dragon
|
Alternatively, the following solution might work, too:
//Assume vector v already contains some Strings
String[] st =new String[v.size()];
v.toArray( st );
|
This is incorrect as you never assign the array to anything.
Plus it's already been answered correctly and more succinctly by Derrick, plus it's a 3 yr old thread. Because of the latter I'm locking it.