for(auto &a :b)

  C++11新標準。.net auto推導類型。code int arr[10]; for(int i=0;i<10;i++) { arr[i]=i; } for(auto &a:arr) { std::cout << a; } 輸出的結果就是0—9這十個數。blog for(auto &a : arr)中「auto &a」就是變量名就和上一個for循環中的「int i」同樣,get 與
相關文章
相關標籤/搜索