If you like my posts please leave a comment.

Saturday, September 8, 2012

C++ Header Files and Associated Library Functions:


Here in this topic we will discuss some important Header files of Turbo C++ 3.0

ctype.h

Contains information used by the character classification and character conversion macros. They are:

isalnum            isalpha             isascii               iscntrl              isdigit              isgraph             islower
isprint              ispunct             isspace             isupper             isxdigit            toascii              _tolower
tolower            _toupper          toupper

conio.h

Declares various functions used in calling the operating system console I/O routines. They are:

cgets                clreol               clrscr                cprintf             cputs                cscanf              delline
getch               getche              getpass                        gettext             gettextinfo      gotoxy             highvideo
inp                   import              inportb             inpw                insline              kbhit                lowvideo
movetext         normvideo       outp                 outport                        outportb          outpw              putch
puttext             _setcursortype                         textattr                        textbackground                       textcolor
textmode

stdio.h

This header files defines all those types and macros that are needed for standard I/O. The file also defines the predefined standard I/O streams. Example: stdin, stdout, stdprn, stderr. Note** Some books may claim that “If the header file iostream.h is included in your program the file stdio.h will get included in your program automatically”. But in case of Turbo C++ 3.0 it is not true. To use any of the functions defined in stdio.h you have to include this file in your program at first. Now let’s see the some important I/O functions contained in stdio.h:

clearerr            _fstrncpy         spawnlp          
fclose               ftell                  spawnlpe        
fcloseall           fwrite              spawnv           
fdopen             getc                 spawnve         
feof                 getchar             spawnvp         
ferror               gets                  spawnvpe       
fflush               getw                sprintf 
fgetc                _pclose            sscanf 
fgetchar           perror               strerror
fgetpos           _popen             _strerror          

fgets                printf               strncpy           
fileno               putc                 tempnam        
flushall             putchar            tmpfile
fopen               puts                 tmpnam          
fprintf              putw                ungetc
fputc                remove            unlink 
fputchar           rename             vfprintf           
fputs                rewind             vfscanf           
fread                rmtmp              vprintf
freopen            scanf                vscanf 

fscanf              setbuf              vsprintf           
fseek                setvbuf            vsscanf           
fsetpos             spawnl
_fsopen           spawnle

stdlib.h

The header file stdlib.h declares several commonly used routines such as conversion routines and search/sort routines and other miscellaneous functions. Functions contained in stdlib.h are as follows:
abort                labs                  realloc
abs                   ldiv                  _rotl
atexit               lfind                _rotr
atof                  _lrotl                _searchenv
atoi                  _lrotr               _searchstr       
atol                  lsearch             _splitpath       
bsearch            ltoa                  srand  
calloc               _makepath       strtod  

_crotr               malloc              strtol   

div                   max                 _strtold           
ecvt                 mblen              strtoul 
exit                  mbstowcs        swab   
_exit                mbtowc           system
fcvt                  min                  time    
free                  putenv             ultoa   
_fullpath          qsort                wcstombs       
gcvt                 rand                 wctomb          
getenv             random           
itoa                  randomize

string.h

Declares several string-manipulation and memory-manipulation routines. They are as follows:
_fmemccpy     _fstrset            strdup 
_fmemchr        _fstrspn           strdup 
_fmemcmp      _fstrstr             strerror
_fmemcpy       _fstrtok           _strerror          
_fmemicmp     _fstrupr           stricmp           
_fmemset        memccpy         strlen  
_fstr*               memchr           strlwr  
_fstrcat            memcmp          strncat
_fstrchr            memcpy           strncmp          

_fstrcmp          memicmp        strncmpi         
_fstrcpy           memmove       strncpy           
_fstrcspn         memset           strnicmp         
_fstrdup          movedata        strnset 
_fstricmp         movmem        strpbrk
_fstrlen            setmem           strrchr 
_fstrlwr           stpcpy             strrev  
_fstrncat          strcat              strset   
_fstrncmp        strchr              strspn  

_fstrncpy         strcmp             strstr   
_fstrnicmp       strcmp             strtok  
_fstrnset          strcmpi                        strupr  
_fstrpbrk         strcoll              strxfrm           
_fstrrchr          strcpy 
_fstrrev            strcspn

math.h

Declares prototypes for the math functions and math error handlers. The functions in math.h header file performs mathematical calculations and conversions. Functions contained in math.h are:

abs       acos,    acosl    asin,     asinl     atan,    atanl    atan2   atan2l  atof _atold      cabs     cabsl
ceil       ceill      cos       cosl      cosh     coshl    exp      expl     fabs     fabs     floor    floorl   fmod   fmodl
frexp    frexpl   hypot   hypotl  labs      ldexp   ldexpl  log       logl      log10   log101 _matherr          _matherrl
modf   modfl poly, polyl       pow     powl    pow10 pow10l            sin        sinl       sinh      sinhl     sqrt
sqrtl     tan       tanl      tanh     tanhl

iomanip.h

The header file iomanip.h declares the C++ streams I/O manipulators and contains macros for creating parameterized manipulators. This header file also includes iostream.h Functions contained in this header file are as follows:
dec      endl     ends     flush    hex      oct       reset/osflags    setfile  setiosflags       setprecision     setw     ws

2 comments: