请教一位朋友拿到的代码
#include#include #include using namespace std; template void func (initializer_list argList) { vector args = argList; cout<< args.size()<< endl; if (args.size()>2) cout<< args[2]<< endl; for (auto s: args) cout<< s<< ' '; cout<< endl; } int main () { func ({1,2,3,4,5}); func ({"123","abc"}); return 0; }



