다음을 통해 공유


Standard Template Library Samples

The following samples demonstrate the use of the Standard Template Library, a subset of the Standard C++ Library.

abs

accumulate, copy and vector::push_back

adjacent_difference and vector::push_back

adjacent_find

adjacent_find (predicate version)

advance

Basic Math Functions

basic_string::append

basic_string::find_first_of

basic_string::size and basic_string::resize

binary_function Structure

count

count_if

deque::assign and deque::swap

deque::begin and deque::end

deque::erase and deque::clear

deque::front and deque::back

deque::insert

deque::operator[] and deque::at

deque::operator== and deque::operator<

deque::push_back and deque::pop_back

deque::push_front and deque::pop_front

deque::rbegin and deque::rend

deque::size and deque::resize

distance

exp, log, and log10

find

find_if

for_each

generate

generate_n

heap

heap (predicate version)

includes

includes (predicate version)

inner_product

inplace_merge

inplace_merge (predicate version)

iter_swap

list::assign

list::back and list::front

list::insert

list::list

lower_bound

lower_bound (predicate version)

make_pair

map::insert, map::find, and map::end

map::max_size, map::clear, map::erase, and map::size

max_element

max_element (predicate version)

Members of the numeric_limits Class

merge

merge (predicate version)

min_element

min_element (predicate version)

new operator

next_permutation

next_permutation (predicate version)

nth_element

nth_element (predicate version)

Pair Logical Operator

partial_sort

partial_sort (predicate version)

partial_sort_copy

partial_sort_copy (predicate version)

partial_sum

partition

prev_permutation

priority_queue functions

queue functions

random_shuffle

random_shuffle (predicate version)

remove

remove_copy

remove_copy_if

remove_if

replace

replace_copy

replace_copy_if

replace_if

reverse

reverse_copy

rotate

rotate_copy

set::key_comp and set::value_comp

set::lower_bound, set::upper_bound, and set::equal_range

set::count

set::empty and set::clear

set::find

set::max_size

set::rbegin and set::rend

set::size

set::swap, set::begin, and set::end

sqrt and pow

stack::operator<

stack::operator==

stack::size

stack::top and stack::empty

string::getline

string::operator!=

string::operator+

string::operator<

string::operator<<

string::operator<=

string::operator==

string::operator>

string::operator>=

string::operator>>

Trigonometry Functions

unary_function<> Structure

upper_bound

upper_bound (predicate version)

vector::operator<

vector::operator==

vector::empty, vector::erase, and vector::push_back

vector::front and vector::back

vector::push_back and vector::pop_back

vector::size and vector::capacity

See Also

Other Resources

Standard C++ Library Reference