Qt 中使用vector时间:2023-03-09 06:45:48 新建Empty qmake project,包含如下两个文件: .pro文件 SOURCES += \ main.cpp QT += core CONFIG += c++11 // 支持C++11 .cpp 文件 #include <vector> #include <iostream> using namespace std; int main(void) { vector<int> v{, , , }; cout << v.size() << endl; return ; }