#include <iostream> #include <vector> int main() { std::vector<std::string> con; con.push_back("9999"); std::cout<<con[0]; return 0; }
vector搞了一个多态,你可以随便赋值和数组一样,不过是动态的,读取的话vector有自带的比for更优雅的方式
标签:std,C++,vector,数组,include,con From: https://www.cnblogs.com/Frank-dev-blog/p/17323265.html