G
Gary Wessle
whats an efficient way to copy a string[] to a vector<string>?
how about this?
#include <iostream>
#include <string>
#include <vector>
Using namespace std;
int main(){
string s[] = { "aaa", "bbb", "ccc" };
vector<string> v( s.begin(), s.end() );
cout << v[1] << endl;
}
how about this?
#include <iostream>
#include <string>
#include <vector>
Using namespace std;
int main(){
string s[] = { "aaa", "bbb", "ccc" };
vector<string> v( s.begin(), s.end() );
cout << v[1] << endl;
}