Skip to content

C libraries

henryyu8 edited this page Sep 7, 2015 · 9 revisions

C++ Libraries

The C++ Standard Library is a collection of classes and functions, which are written in the core language and part of the C++ ISO Standard itself. The C++ Standard Library provides several generic containers, functions to utilize and manipulate these containers, function objects, generic strings and streams (including interactive and file I/O), support for some language features, and everyday functions for tasks such as finding the square root of a number. A noteworthy feature of the C++ Standard Library is that it not only specifies the syntax and semantics of generic algorithms, but also places requirements on their performance. These performance requirements often correspond to a well-known algorithm, which is expected but not required to be used.

C++ Libraries consist three parts

C Library

  1. cassert: (assert.h) If the argument expression of this macro with functional form compares equal to zero (i.e., the expression is false), a message is written to the standard error device and abort is called, terminating the program execution.http://www.cplusplus.com/reference/cassert/assert/
  2. cctype: (ctype.h) This header declares a set of functions to classify and transform individual characters. http://www.cplusplus.com/reference/cctype/
  3. cerrno: (errno.h) errno is set to zero at program startup, and any function of the standard C library can modify its value to some value different from zero, generally to signal specific categories of error (no library function sets its value back to zero once changed). http://www.cplusplus.com/reference/cerrno/errno/
  4. cfloat: (float.h) This header describes the characteristics of floating types for the specific system and compiler implementation used. http://www.cplusplus.com/reference/cfloat/
  5. ciso646: (iso646.h) This header defines eleven macro constants with alternative spellings for those C++ operators not supported by the ISO646 standard character set. http://www.cplusplus.com/reference/ciso646/
  6. climits: (limits.h) This header defines constants with the limits of fundamental integral types for the specific system and compiler implementation used. http://www.cplusplus.com/reference/climits/
  7. clocale: (locale.h) The C language supports localization specific settings, such as culture-specific date formats or country-specific currency symbols. http://www.cplusplus.com/reference/clocale/
  8. cmath: (math.h) Header declares a set of functions to compute common mathematical operations and transformations, such as abs(), sqrt() and exp(). http://www.cplusplus.com/reference/cmath/
  9. csetjmp: (setimp.h) The tools provided through this header file allow the programmer to bypass the normal function call and return discipline, by providing the means to perform jumps preserving the calling environment. This function has been replaced by the exception mechanism in C++. http://www.cplusplus.com/reference/csetjmp/
  10. csignal: (signal.h) Some running environments use signals to inform running processes of certain events. These events may be related to errors performed by the program code, like a wrong arithmetical operation or to exceptional situations, such as a request to interrupt the program. http://www.cplusplus.com/reference/csignal/
  11. cstdarg: (stdarg.h) This header defines macros to access the individual arguments of a list of unnamed arguments whose number and types are not known to the called function. http://www.cplusplus.com/reference/cstdarg/
  12. cstddef: (stddef.h) This header defines several types implicitly generated or used by certain language expressions. For example, NULL pointer (void *type), Ptrdiff_t type, and offssetof(). http://www.cplusplus.com/reference/cstddef/
  13. cstdio: (stdio.h) Input and Output operations can also be performed in C++ using the C Standard Input and Output Library (cstdio, known as stdio.h in the C language). http://www.cplusplus.com/reference/cstdio/
  14. cstdlib: (stdlib.h) This header defines several general purpose functions, including dynamic memory management, random number generation, communication with the environment, integer arithmetics, searching, sorting and converting. http://www.cplusplus.com/reference/cstdlib/
  15. cstring: (string.h) This header file defines several functions to manipulate C strings and arrays. http://www.cplusplus.com/reference/cstring/
  16. ctime: (time.h) This header file contains definitions of functions to get and manipulate date and time information. http://www.cplusplus.com/reference/ctime/
  17. cwchar: (wchar.h) This header file defines several functions to work with C wide strings, similar with cchar. http://www.cplusplus.com/reference/cwchar/
  18. cwctype: (wctype.h) This header declares a set of functions to classify and transform individual wide characters, similar with cctype. http://www.cplusplus.com/reference/cwctype/

C++ Library

  1. complex: The complex library implements the complex class to contain complex numbers in cartesian form and several functions and overloads to operate with them. http://www.cplusplus.com/reference/complex/
  2. exception: This header defines the base class for all exceptions thrown by the elements of the standard library: exception, along with several types and utilities to assist handling exceptions. http://www.cplusplus.com/reference/exception/
  3. string: This header introduces string types, character traits and a set of converting functions. http://www.cplusplus.com/reference/string/
  4. ios: Base class for streams (type-dependent components). http://www.cplusplus.com/reference/ios/ios/
  5. iostream: This class inherits all members from its two parent classes istream and ostream, thus being able to perform both input and output operations. http://www.cplusplus.com/reference/istream/iostream/
  6. istream: Input stream objects can read and interpret input from sequences of characters. Specific members are provided to perform these input operations. The standard object cin is an object of this type. http://www.cplusplus.com/reference/istream/istream/
  7. ostream: Output stream objects can write sequences of characters and represent other kinds of data. Specific members are provided to perform these output operations. The standard objects cout, cerr and clog are objects of this type. http://www.cplusplus.com/reference/ostream/ostream/
  8. fstream: Input/output stream class to operate on files. Objects of this class maintain a filebuf object as their internal stream buffer, which performs input/output operations on the file they are associated with (if any). File streams are associated with files either on construction, or by calling member open. http://www.cplusplus.com/reference/fstream/fstream/
  9. strstream: Stream class to operate on strings. http://www.cplusplus.com/reference/sstream/stringstream/
  10. new: This header describes functions used to manage dynamic storage in C++. http://www.cplusplus.com/reference/new/
  11. typeinfo: This header defines types used related to operators typeid and dynamic_cast. http://www.cplusplus.com/reference/typeinfo/

Numerical Containers:

  1. numerics: This header describes a set of algorithms to perform certain operations on sequences of numeric values. Due to their flexibility, they can also be adapted for other kinds of sequences.
    accumulate, inner_product, partial_sum, and adjacent_difference. http://www.cplusplus.com/reference/numeric/
  2. complex: The complex library implements the complex class to contain complex numbers in cartesian form and several functions and overloads to operate with them. http://www.cplusplus.com/reference/complex/
  3. valarray: This header declares the valarray class and its auxiliary classes and functions. http://www.cplusplus.com/reference/valarray/

STL Library

General Containers:

  1. bitset: A bitset stores bits (elements with only two possible values: 0 or 1, true or false, ...). The class emulates an array of bool elements, but optimized for space allocation: generally, each element occupies only one bit (which, on most systems, is eight times less than the smallest elemental type: char). http://www.cplusplus.com/reference/bitset/
  2. deque: Double ended queue. Deque (usually pronounced like "deck") is an irregular acronym of double-ended queue. Double-ended queues are sequence containers with dynamic sizes that can be expanded or contracted on both ends (either its front or its back). http://www.cplusplus.com/reference/deque/deque/
  3. list: Lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence, and iteration in both directions. http://www.cplusplus.com/reference/list/
  4. map: Maps are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order. http://www.cplusplus.com/reference/map/
  5. queue: Header that defines the queue and priority_queue container adaptor classes. http://www.cplusplus.com/reference/queue/
  6. set: Header that defines the set and multiset container classes. http://www.cplusplus.com/reference/set/
  7. stack: Header that defines the stack container class. http://www.cplusplus.com/reference/stack/
  8. vector: Header that defines the vector container class. Vectors are sequence containers representing arrays that can change in size. http://www.cplusplus.com/reference/vector/

Iterator, Algorithm and General Subprogram:

  1. algorithm: The header defines a collection of functions especially designed to be used on ranges of elements. http://www.cplusplus.com/reference/algorithm/
  2. functional: Function objects are objects specifically designed to be used with a syntax similar to that of functions. In C++, this is achieved by defining member function operator() in their class. http://www.cplusplus.com/reference/functional/
  3. iterator: An iterator is any object that, pointing to some element in a range of elements (such as an array or a container). http://www.cplusplus.com/reference/iterator/
  4. memory: This header defines general utilities to manage dynamic memory. Template Class: autp_prt. Can use any class in the namespace std. http://www.cplusplus.com/reference/memory/
  5. utility: This header contains utilities in unrelated domains. Template Class: pair. Provide comparison operation. http://www.cplusplus.com/reference/

Reference

http://www.cplusplus.com/reference/
http://en.cppreference.com/w/cpp/links/libs
http://en.cppreference.com/w/cpp/header