vector<string> or vector<char *>?
- by Aaron
Question:
What is the difference between:
vector<string> and vector<char *>?
How would I pass a value of data type: string to a function, that specifically accepts:
const char *?
For instance:
vector<string> args(argv, argv + argc);
vector<string>::iterator i;
void foo (const char *); //*i
I understand using vector<char *>: I'll have to copy the data, as well as the pointer
Edit:
Thanks for input!