Aracılığıyla paylaş


vector::max_size

Vektör en fazla uzunluğunu döndürür.

size_type max_size( ) const;

Dönüş Değeri

En büyük olası uzunluğunu vector.

Örnek

// vector_max_size.cpp
// compile with: /EHsc
#include <vector>
#include <iostream>

int main( )
{
   using namespace std;   
   vector <int> v1;
   vector <int>::size_type i;

   i = v1.max_size( );   
   cout << "The maximum possible length of the vector is " << i << "." << endl;
}

Örnek Çıktı

The maximum possible length of the vector is 1073741823.

Gereksinimler

Başlık: <vector>

Namespace: std

Ayrıca bkz.

Başvuru

vector Class

Standart Şablon Kütüphanesi