C++ 函數與const和constexpr

返回const引用的函數。ios #include<iostream> using namespace std; const int& index(int x[], int n) { return x[n]; } void main() { int a[] = { 0,1,2,3,4,5,6,7,8,9 }; cout << index(a, 6) << endl; index(a,2)=
相關文章
相關標籤/搜索