cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : C Library : cstdlib
 
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
C Library
cassert (assert.h)
cctype (ctype.h)
cerrno (errno.h)
cfloat (float.h)
climits (limits.h)
clocale (locale.h)
cmath (math.h)
csetjmp (setjmp.h)
csignal (signal.h)
cstdarg (stdarg.h)
cstddef (stddef.h)
cstdio (stdio.h)
cstdlib (stdlib.h)
cstring (string.h)
ctime (time.h)
cstdlib (stdlib.h)
functions:
· abort
· abs
· atexit
· atof
· atoi
· atol
· bsearch
· calloc
· div
· exit
· free
· getenv
· labs
· ldiv
· malloc
· mblen
· mbstowcs
· mbtowc
· qsort
· rand
· realloc
· srand
· strtod
· strtol
· strtoul
· system
· wcstombs
· wctomb
functions (non-standard):
· itoa
macros:
· EXIT_FAILURE
· EXIT_SUCCESS
· MB_CUR_MAX
· NULL
· RAND_MAX
types:
· div_t
· ldiv_t
· size_t

-

cstdlib (stdlib.h) header

C Standard General Utilities Library

This header defines several general purpose functions, including dynamic memory management, random number generation, communication with the environment, integer arthmetics, searching, sorting and converting.

Functions

String conversion:
atof Convert string to double (function)
atoi Convert string to integer (function)
atol Convert string to long integer (function)
strtod Convert string to double (function)
strtol Convert string to long integer (function)
strtoul Convert string to unsigned long integer (function)

Pseudo-random sequence generation:

rand Generate random number (function)
srand Initialize random number generator (functions)

Dynamic memory management:

calloc Allocate space for array in memory (function)
free Deallocate space in memory (function)
malloc Allocate memory block (function)
realloc Reallocate memory block (function)

Environment:

abort Abort current process (function)
atexit Set function to be executed on exit (function)
exit Terminate calling process (function)
getenv Get environment string (function)
system Execute system command (function)

Searching and sorting:

bsearch Binary search in array (function)
qsort Sort elements of array (function)

Integer arithmethics:

abs Absolute value (function)
div Integral division (function)
labs Absolute value (function)
ldiv Integral division (function)

Multibyte characters:

mblen Get length of multibyte character (function)
mbtowc Convert multibyte character to wide character (function)
wctomb Convert wide character to multibyte character (function)

Multibyte strings:

mbstowcs Convert multibyte string to wide-character string (function)
wcstombs Convert wide-character string to multibyte string (function)

Macros

EXIT_FAILURE Failure termination code (macro)
EXIT_SUCCESS Success termination code (macro)
MB_CUR_MAX Maximum size of multibyte characters (macro)
NULL Null pointer (macro)
RAND_MAX Maximum value returned by rand (macro)

Types

div_t Structure returned by div (type)
ldiv_t Structure returned by div and ldiv (type)
size_t Unsigned integral type (type)
© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us