C++ standard library Flashcards
code written to be used as part of other programs
library
libraries give you access to ready made blank
libraries give access to
functions
data
values
Function example
getline( )
Data type example
vector
Value example
M_PI and M_e
#include iostream #include vector these are blank
libraries #include iostream #include vector
vector
map
array
these are blank
data types
vector
map
array
Features of C++ Standard Libraries include
blank and blank facilities
Input and output facilities
Features of C++ Standard libraries includes blank and blank facilities container blank blank blank functions implementation of useful blank the blank data type and more...
Features of C++ Standard Libraries include input and output facilities container data type mathematical functions implementation of useful algorithms the string data type and more...
#include vector #include map these are called blank
libraries but
these are container data types
to use the features of C++ Standard library, you must #include the appropriate
header
Examples of headers
#include iostream #include string #include vector
#include cmath #include cctype #include cstring #include cstdint #include climits these are all from
the older C standard library
yet still can be used by C++
char variable = ‘a’
char string = to upper(variable);
what would the output be
A
note that char is the data type
‘variable’ is the variable
toupper() uppercases what is in parentheses
#include cmath has advanced math functions such as pow(blank, blank) which returns blank raised to the power blank
pow(base, exponent)
which returns base raised to the power exponent
#include cmath also includes sqrt(x): returns the blank log(x): returns the natural base-e logarithm of blank log10(x): returns the base-10 logarithm of x abs(x): returns the blank sin(x), cos(x), tan(x): trigonometric functions
sqrt(x): returns the square root of x
log(x): returns the natural base-e logarithm of x
log10(x): returns the base-10 logarithm of x
abs(x): returns the absolute value
sin(x), cos(x), tan(x): trigonometric functions