vector - STL C++

vector<X, A>::max_size()

Declaration

size_type vector<X,A>::max_size() const;

Description

This is the max_size() function for the vector class template.

Header Include

#include <vector>

Example

#include <iostream>
#include <vector>

int main()
{
	using namespace std;

	// Output the maximum size of a vector
	vector<int> qV;
	cout << "The maximum size is " << qV.max_size() << endl;

	// Keep the window open
	cin.get();
	return 0;
}

Output

vector<X, A>::max_size() Output
 

© 2007–2025 XoaX.net LLC. All rights reserved.