#include<iostream> #include<vector> using namespace std; int main() { vector<string> v{"Welcome to javaTpoint","c"}; int n=v.size(); cout<<"Size of the string is :"<<n; return 0; } C++ Copy输出:Size of the string is:2 C++ Copy在这个示例中,向量v包含两个字符串,并且size(...