标签:pen class typename style nbsp statement type const print
语法如下:
for(decl:coll){ statement }
举例:
template <typename T> void printElements(const T& coll){ for(const auto& elem:coll){ cout<<elem<<endl; } } int a[]={1,2,3}; printElements(a);
标签:pen class typename style nbsp statement type const print
原文地址:https://www.cnblogs.com/xiaoaofengyue/p/12853439.html