Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create an array of string objects
- std::string arr[] = {"first", "sec", "third", "fourth"};
- // Initialize vector with a string array
- std::vector<std::string> vecOfStr(arr, arr + sizeof(arr)/sizeof(std::string));
- for(std::string str : vecOfStr)
- std::cout<<str<<std::endl;
- vector (InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type());
Add Comment
Please, Sign In to add comment