C + + STL

Source: Internet
Author: User
Tags bit set

1.list

Assign () assigns a value to the list
Back () returns the last element
Begin () returns the iterator that points to the first element
Clear () Delete all elements
Empty () Returns True if list is empty
End () returns the end of the iterator
Erase () Delete an element
Front () returns the first element
Get_allocator () returns the Configurator for list
Insert () Inserts an element into the list
Max_size () returns the maximum number of elements the list can hold
Merge () merges two lists
Pop_back () Delete last element
Pop_front () Delete the first element
Push_back () Adds an element at the end of the list
Push_front () Adds an element to the head of the list
Rbegin () returns a reverse iterator pointing to the first element
Remove () removes an element from the list
remove_if () Delete elements by specified criteria
Rend () reverse iterator to the end of list
Resize () Change the size of the list
Reverse () Reverses the elements of the list
Size () returns the number of elements in the list
Sort () Sorts the list
Splice () Merge two lists
Swap () swap two list
Unique () Delete duplicate elements in list

    //display data from Listone back to frontcout<<"listone.begin ()---listone.end ():"<<Endl;  for(i = Listone.begin (); I! = Listone.end (); + +i) cout<< *i <<" "; cout<<Endl; //display data from Listone in the forward directionListint::reverse_iterator ir; cout<<"listone.rbegin ()---listone.rend ():"<<Endl;  for(IR =listone.rbegin (); Ir!=listone.rend (); ir++) {cout<< *ir <<" "; } cout<< Endl;

2.

3.c++ header File

C + + header file list
C, traditional C + +

#include <assert.h> set the insertion point
#include <ctype.h> character processing
#include <errno.h> define error codes
#include <float.h> floating point processing
#include <fstream.h> file input/output
#include <iomanip.h> parametric input/output
#include <iostream.h> data stream input/output
#include <limits.h> define a variety of data type-Maximum constants
#include <locale.h> define localization functions
#include <math.h> defining mathematical functions
#include <stdio.h> define input/output functions
#include <stdlib.h> define miscellaneous functions and memory allocation functions
#include <string.h> string processing
#include <strstrea.h> array-based input/output
#include <time.h> define functions about time
#include <wchar.h> wide character processing and input/output
#include <wctype.h> wide character classification

Standard C + +

#include <algorithm> general Algorithms
#include <bitset> bit set container
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex> plural classes
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque> dual-ended queue container
#include <exception> exception Handling classes
#include <fstream>
#include <functional> define arithmetic functions (instead of operators)
#include <limits>
#include <list> linear list container
#include <map> mapping container
#include <iomanip>
#include <ios> basic input/output support
Pre-declaration for #include <iosfwd> input/output system use
#include <iostream>
#include <istream> Basic input stream
#include <ostream> basic output stream
#include <queue> queue Container
#include <set> collection containers
#include <sstream> string-based streams
#include <stack> stack Container
#include <stdexcept> Standard Exception classes
#include <streambuf> bottom input/output support
#include <string> string Classes
#include <utility> generic template classes
#include <vector> dynamic Array container
#include <cwchar>
#include <cwctype>

C99 Increase

#include <complex.h> complex processing
#include <fenv.h> floating-point environment
#include <inttypes.h> integer format conversion
#include <stdbool.h> boolean environment
#include <stdint.h> integral environment
#include <tgmath.h> generic type math macros

C + + STL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.