Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

string to vector c++

#include <iostream>
#include <string>
#include <vector>
 
int main()
{
    std::string s = "Hello World!";
 
    std::vector<char> v(s.begin(), s.end());
 
    for (const char &c: v)
        std::cout << c;
 
    return 0;
}
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #string #vector
ADD COMMENT
Topic
Name
7+2 =