运行 ❯
行得通
自己
网页
×
更改方向
更改主题,深色/浅色
进入 Spaces
#include <iostream> #include <vector> using namespace std; int main() { vector<string> cars = {"Volvo", "BMW", "Ford", "Mazda"}; cout << "Size before: " << cars.size() << "\n"; cars.clear(); cout << "Size after: " << cars.size() << "\n"; return 0; }
之前的大小:4
之后的大小:0