cplusplus.com
  C++ Library Reference : Strings library : string : get_allocator
- -
º¯Êý¿â
C++º¯Êý¿â
Cº¯Êý¿â
C++º¯Êý¿â
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Strings library
char_traits
classes:
· string
global functions:
· getline
· operator+
· operator<<
· operator>>
· comparison operators
· swap
string
· string::string
member constants:
· string::npos
member functions:
· string::append
· string::assign
· string::at
· string::begin
· string::capacity
· string::clear
· string::compare
· string::copy
· string::c_str
· string::data
· string::empty
· string::end
· string::erase
· string::find
· string::find_first_not_of
· string::find_first_of
· string::find_last_not_of
· string::find_last_of
· string::get_allocator
· string::insert
· string::length
· string::max_size
· string::operator+=
· string::operator=
· string::operator[]
· string::push_back
· string::rbegin
· string::rend
· string::replace
· string::reserve
· string::resize
· string::rfind
· string::size
· string::substr
· string::swap

-

string::get_allocator public member function
allocator<char> get_allocator( ) const;

Get allocator

Returns the allocator object used to constuct the object.

Allocators define memory allocation models. For string objects this is an object of the standard allocator type for char elements: allocator<char>, which is value independent, but basic_string objects may specify different allocator types as a template parameter of the class template, and different values for them on object construction.

Parameters

none

Return Value

The allocator value.

Basic template member declaration

( basic_string<charT,traits,Allocator> )
typedef Allocator allocator_type;
allocator_type get_allocator() const;
© Copyright © 2007-2008 ¿áÇÚÍø All Rights Reserved