reference deque<X,A>::at(size_type qIndex);
#include <deque>
const_reference deque<X,A>::at(size_type qIndex) const;
#include <iostream> #include <deque> int main() { using namespace std; // Create a deque instance deque<int> qD; qD.push_back(3); qD.push_back(4); int& irIntRef = qD.at(0); const int& kirConstIntRef = qD.at(1); cout << "D[0] = " << irIntRef << endl; cout << "D[1] = " << kirConstIntRef << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.