- C++ Programming Basics
- C++ Tutorial
- C++ Environment Setup
- C++ Character Set
- C++ Keywords
- C++ Identifiers
- C++ Constants
- C++ Punctuators
- C++ Program Structure
- C++ Basic Syntax
- C++ Comments
- C++ Basic Programs
- C++ Input Output Operator
- C++ Input Output Stream
- C++ Type & Variable
- C++ Data Types
- C++ Data Type Modifiers
- C++ Variables
- C++ Variable Types
- C++ Variable Scope
- C++ Storage Classes
- C++ Formatting Output
- C++ Operators
- C++ Operators
- C++ Type Conversion
- C++ Numbers
- C++ Assignment Operator
- C++ Shorthand
- C++ Flow of Control
- C++ Statements
- C++ Flow Control
- C++ Decision Making
- C++ if if-else if-else-if switch
- C++ Loops
- C++ for while do-while Loop
- C++ break continue goto
- C++ Standard Library
- C++ Standard Library
- C++ Header Files
- C++ Character String
- C++ Mathematical Functions
- C++ Functions
- C++ Functions
- C++ Function Types
- C++ Function Prototype
- C++ Function Call
- C++ Function Return
- C++ Friend Function
- C++ Scope Rules
- C++ Arrays & Strings
- C++ Arrays
- C++ One Dimensional Arrays
- C++ Two Dimensional Arrays
- C++ Strings
- C++ Data Structure
- C++ Data Structure
- C++ Access Structure Member
- C++ Nested Data Structure
- C++ Structure Array
- C++ Pass Structure to Function
- C++ typedef
- C++ #define
- C++ Programming Pointers
- C++ Pointers
- C++ Memory Map
- C++ Free Store
- C++ Declare Initialize Pointers
- C++ Dynamic Memory Allocation
- C++ Pointers & Arrays
- C++ Pointers & Const
- C++ Pointers & Functions
- C++ Pointers & Structures
- C++ Objects as Function Arguments
- C++ Pointers & Objects
- C++ References
- C++ File Handling
- C++ File Handling
- C++ File Streams
- C++ Data Files
- C++ Opening & Closing Files
- C++ Steps to Process Files
- C++ Change Stream Behaviour
- C++ Sequential I/O Operations
- C++ Detecting EOF
- C++ File Pointers Random Access
- C++ Binary Files Operations
- C++ Error Handling
- C++ Object Oriented
- C++ Object Oriented
- C++ Function Overloading
- C++ Classes & Objects
- C++ Constructors & Destructors
- C++ Inheritance
- C++ Encapsulation
- C++ Polymorphism
- C++ Data Abstraction
- C++ Interfaces
- C++ Programming Advance
- C++ Linked Lists
- C++ Stacks
- C++ Queues
- C++ Date Time
- C++ Preprocessors
- C++ Exception Handling
- C++ Namespaces
- C++ Dynamic Memory
- C++ Multithreading
- C++ Templates
- C++ Signal Handling
- C++ Web Programming
- C++ Programming Examples
- C++ Programming Examples
- C++ Programming Test
- C++ Programming Test
- Give Online Test
- All Test List
C++ Header Files
The C++ standard library contains files containing the standard functions that your program may use. These files are known as header files. Header files provide function prototype definitions for library functions. Data types and constants used with the library functions are also defined in them.
Let's discuss some important header files of Borland C++.
stdio.h
This header files defines types and macros needed for the standard I/O package. This file also defines the standard I/O predefined streams i.e., stdin, stdout, stdprn, and stderr. When you include iostream.h file in your program, this file i.e., stdio.h automatically gets included in your program. The standard I/O functions contained in stdio.h are given in the following table :
clearerr | fclose | fcloseall | fopen | feof |
feror | fflush | fgetc | fgetchar | fgetpos |
fgets | fileno | flushall | fopen | fprintf |
fputc | fputchar | fputs | fread | freopen |
fscanf | fseek | fsetpos | -fsopen | ftell |
fwrite | getc | getchar | gets | getw |
perror | printf | putc | putchar | puts |
putw | remove | rename | rewind | rmtmp |
scanf | setbuf | setvbuf | sprintf | -strerror |
strerror | tempnam | tmpfile | tmpram | ungetc |
vfprintf | vfscanf | vprintf | vscanf | vsprintf |
iostream.h
This header file declares the basic C++ streams I/O routines. Some of the functions defined in it are :
open | close | get | getline | read |
write | put | seekg | seekp | tellg |
tellp | ignore | peek | putback | flush |
rdstate | bad | eof | fail | good |
clear |
string.h
This header file declares several string manipulation and memory manipulation routines. The functions contained in string.h are given in the following table:
memccpy | memchr | memcmp | memcpy |
memicmp | memmove | memset | movedata |
movemem | stpcp | strcat | strchr |
strcmp | strcoll | strcpy | strcspn |
strdup | strerror | stricmp | strcmpi |
strlen | strlwr | strncat | strncmp |
strncmpi | stncpy | strnicmp | strnset |
strpbrk | strrchr | strrew | strset |
strspm | strstr | strtok | strupr |
strxfrm |
math.h
This header file declares prototypes for the math functions and math error handlers. The routines in math.h file perform mathematical calculations and conversion.
acos | acosl | asin | asinl | atan |
atanl | atan2 | atan2l | atof | cabs |
cabsl | ceil | ceill | cos | cosl |
cosh | coshl | div | exp | expl |
fabs | fabsl | fevt | floor | floorl |
fmod | fmodl | frexp | fexpl | hypot |
hypoll | dexp | ldexpl | ldiv | log |
logl | logio | log101 | matherr | _matherrl |
modf | modfl | poly | polyl | pow |
polywl | powlo | pow101 | sin | sinl |
sinh | sinhl | sqrt | sqrtl | tan |
tanl | tanh | tanhl |
stdlib.h
This header file declares several commonly used routines like conversion routines, search/sort routines, and other miscellaneous things. Some of its functions are :
_fullpath | _makepath | _searchenv | _splitpath |
atof | atoi | atol | ecvt |
fcvt | gevt | itoa | ltoa |
_strdate | _strtime | strtod | strtol |
_strtoid | strtoul | ultoa | mblen |
mbtowc | wcstombs | wctomb | abs |
labs | _irotl | _irotr | calloc |
coreleft | free | malloc | realloc |
iomanip.h
This header file declares the C++ streams I/O manipulators and contains macros for creating parameterised manipulators. Some of its functions are :
dec | endl | ends | flush |
hex | oct | reset/osflags | setbase |
setfile | setiosflags | setprecision | setw |
ws |
« Previous Tutorial Next Tutorial »