Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ vector

#include <vector>
#include <string>

int main() {
  std::vector<std::string> str_v;
  str_v.push_back("abc");
  str_v.push_back("hello world!!");
  str_v.push_back("i'm a coder.");
  for(auto it = str_v.beigin();it != str_v.end(); it++) {
  	printf("%s
",it->c_str());
  }
}
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #vector
ADD COMMENT
Topic
Name
4+8 =