.


:




:

































 

 

 

 


-




 

. 5

1 ( ), 6

1.1 STL ++. 6

1.2 STL. 7

2 .. 9

2.1 .. 9

2.1.1 (Pair / Tuple) 9

2.2 . 10

2.2.1 (vector) 10

2.2.2 (list) 11

2.2.3 forward_list 13

2.2.4 (deque) 13

2.3 -.. 13

2.3.1 (queue) 13

2.3.2 (priority queue) 14

2.3.3 (stack) 15

2.4 . 15

2.4.1 (set) 15

2.4.2 multiset 16

2.4.3 (map) 16

2.4.4 multimap. 18

2.4.5 unordered_set, unordered_multiset, unordered_map, unordered_multimap 18

2.5 . 19

2.5.1 bitset 19

2.5.2 valarray. 19

2.6 push_back vector. emplace_back. 19

3 .. 20

4 .. 21

4.1 .. 21

4.1.1 all_of / any_of / none_of 22

4.1.2 for_each. 22

4.1.3 find / find_if / find_if_not / find_end / find_first_of 23

4.1.4 count / count_if 24

4.1.5 mismatch. 24

4.1.6 equal / is_permutation. 24

4.1.7 search / search_n. 24

4.2 .. 24

4.2.1 copy / copy_n / copy_if / copy_backward. 24

4.2.2 move / move_backward. 25

4.2.3 swap / swap_ranges. 25

4.2.4 transform.. 25

4.2.5 replace / replace_if / replace_copy / replace_copy_if 25

4.2.6 fill / fill_n. 26

4.2.7 generate / generate_n. 26

4.2.8 remove / remove_if / remove_copy / remove_copy_if 26

4.2.9 unique / unique_copy. 26

4.2.10 reverse / reverse_copy. 26

4.2.11 rotate / rotate_copy. 26

4.2.12 shuffle / random_shuffle. 26

4.3 () 26

4.3.1 is_partioned. 26

4.3.2 partition / stable_partition / partition_copy. 26

4.3.3 partition_point 26

4.4 . 27

4.4.1 sort / stable_sort 27

4.4.2 partial_sort / partial_sort_copy. 27

4.4.3 is_sorted / is_sorted_until 27

4.5 . 27

4.5.1 lower_bound / upper_bound. 27

4.5.2 equal_range. 27

4.5.3 binary_search. 28

4.6 ( ) 28

4.6.1 merge. 28

4.6.2 includes. 28

4.6.3 set_union / set_intersection / set_difference / set_symetric_difference 28

4.7 ( , ) 28

4.7.1 push_heap / pop_heap / make_heap. 28

4.7.2 sort_heap. 28

4.7.3 is_heap / is_heap_until 28

4.8 min/max. 28

4.8.1 min / max / minmax. 28

4.8.2 min_element / max_element / minmax_element 28

5 , -. 29

6 STL. 30

7 STL. 31

 

 

http://www.solarix.ru/for_developers/cpp/stl/stl.shtml http://en.wikipedia.org/wiki/Standard_Template_Library

http://ru.cppreference.com/w/cpp/container/vector

http://www.cplusplus.com/reference/algorithm/

 

 

( ),

1.1 STL ++

, , ( ), , . . STL.

-

. , .

#define LANG(cName, lName) \

class cName \

{ \

public: \

cName()\

{ \

_langName = SET_LANG(lName); \

_reader = new PDDefFileReader(_langName); \

} \

~cName(){}\

\

std::string Str(){ return _langName; } \

\

private: \

PDDefFileReader* _reader; \

std::string _langName; \

}; \

: .

1.1.2 STL ++

1971 . .

: , .

1987. . , - .

++.

1998. , ++ , ISO.

STL standard template library. .

 

: , , , , , , : , , (, , ++ ) , . , , , , .

. . , , .





:


: 2015-05-05; !; : 397 |


:

:

, .
==> ...

1584 - | 1393 -


© 2015-2024 lektsii.org - -

: 0.013 .