<vector>
컨테이너 클래스 템플릿 vector 및 다양한 지원 클래스 템플릿을 정의합니다.
vector는 선형 시퀀스에서 지정된 유형의 요소를 구성하는 컨테이너입니다. 이 컨테이너를 사용하면 모든 요소에 빠르게 임의 액세스할 수 있으며 시퀀스에 대한 동적 추가와 제거를 수행할 수 있습니다. 임의 액세스 성능이 가장 중요할 때는 vector를 시퀀스에 대한 기본 컨테이너로 사용합니다. 사용할 컨테이너의 유형을 모르는 경우에도 벡터를 선택합니다.
vector 클래스에 대한 자세한 내용은 vector 클래스를 참조하세요. 특수화 vector<bool>에 대한 자세한 내용은 vector<bool> 클래스를 참조하세요.
namespace std {
template<class Type, class Allocator>
class vector;
template<class Allocator>
class vector<bool>;
template<class Allocator>
struct hash<vector<bool, Allocator> >;
// TEMPLATE FUNCTIONS
template<class Type, class Allocator>
bool operator== (
const vector< Type, Allocator>& _Left,
const vector< Type, Allocator>& _Right
);
template<class Type, class Allocator>
bool operator!= (
const vector< Type, Allocator>& _Left,
const vector< Type, Allocator>& _Right
);
template<class Type, class Allocator>
bool operator< (
const vector< Type, Allocator>& _Left,
const vector< Type, Allocator>& _Right
);
template<class Type, class Allocator>
bool operator> (
const vector< Type, Allocator>& _Left,
const vector< Type, Allocator>& _Right
);
template<class Type, class Allocator>
bool operator<= (
const vector< Type, Allocator>& _Left,
const vector< Type, Allocator>& _Right
);
template<class Type, class Allocator>
bool operator>= (
const vector< Type, Allocator>& _Left,
const vector< Type, Allocator>& _Right
);
template<class Type, class Allocator>
void swap (
vector< Type, Allocator>& _Left,
vector< Type, Allocator>& _Right
);
} // namespace std
매개 변수
형식
벡터에 저장되는 데이터 형식에 대한 템플릿 매개 변수입니다.Allocator
메모리 할당 및 할당 취소를 수행하는 저장된 할당자 개체에 대한 템플릿 매개 변수입니다. 대부분의 경우에는 이 매개 변수를 무시하고 기본 할당자만 사용하면 됩니다._Left
비교 작업의 첫 번째(왼쪽) 벡터입니다._Right
비교 작업의 두 번째(오른쪽) 벡터입니다.
연산자
연산자의 왼쪽에 있는 벡터 개체가 오른쪽에 있는 벡터 개체와 같지 않은지 테스트합니다. |
|
연산자의 왼쪽에 있는 벡터 개체가 오른쪽에 있는 벡터 개체보다 작은지 테스트합니다. |
|
연산자의 왼쪽에 있는 벡터 개체가 오른쪽에 있는 벡터 개체보다 작거나 같은지 테스트합니다. |
|
연산자의 왼쪽에 있는 벡터 개체가 오른쪽에 있는 벡터 개체와 같은지 테스트합니다. |
|
연산자의 왼쪽에 있는 벡터 개체가 오른쪽에 있는 벡터 개체보다 큰지 테스트합니다. |
|
연산자의 왼쪽에 있는 벡터 개체가 오른쪽에 있는 벡터 개체보다 크거나 같은지 테스트합니다. |
클래스
선형 정렬에서 지정된 형식의 요소를 정렬하고 모든 요소에 대한 빠른 임의 액세스를 허용하는 시퀀스 컨테이너의 클래스 템플릿입니다. |
특수화
bool 유형 요소에 대한 템플릿 클래스 벡터의 전체 특수화로, 특수화에 사용되는 기본 유형에 대한 할당자를 포함합니다. |
요구 사항
헤더: <vector>
네임스페이스: std