Aracılığıyla paylaş


list::reference

Listede depolanmış bir öðe için bir başvuru sağlar türü.

typedef typename Allocator::reference reference;

Örnek

// list_ref.cpp
// compile with: /EHsc
#include <list>
#include <iostream>

int main( ) 
{
   using namespace std;
   list <int> c1;
   
   c1.push_back( 10 );
   c1.push_back( 20 );

   int &i = c1.front( );
   int &j = c1.back( );
   cout << "The first element is " << i << endl;
   cout << "The second element is " << j << endl;
}
  

Gereksinimler

Başlık: <list>

Namespace: std

Ayrıca bkz.

Başvuru

list Class

Standart Şablon Kütüphanesi