basic_string::allocator_type
表示字串物件的配置器類別的型別。
typedef Allocator allocator_type;
備註
這個型別是樣板參數 Allocator的同義字。
範例
// basic_string_allocator_type.cpp
// compile with: /EHsc
#include <string>
#include <iostream>
int main( )
{
using namespace std;
// The following lines declare objects
// that use the default allocator.
string s1;
basic_string <char>::allocator_type xchar = s1.get_allocator( );
// You can now call functions on the allocator class xchar used by s1
}
需求
標頭:<string>
命名空間: std