vector、map作为函数入参时,赋默认值
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
void testMap(const vector<int> &vTmp = vector<int>(), const map<string, double> &mapParam = map<string, double>())
{
cout << "test end" << endl;
}
int main()
{
testMap();
getchar();
return 0;
}

浙公网安备 33010602011771号