Dependencies
Comments
C++ introudces a new comment symbol //(double slash). Comments start with a double slash symbol and terminate at the end of the line.Note there is no closing symbol.
* The double slash comment is basically a single line comment. Single line comments can be written as follows:-
// C++ New comments features.
* The C comment symbols/* text */ are still valid and more suitalble for multilne comments. Multiline comments can be written as follows:-
/* The is an example to show
feature of C comment symbols
used in c++ */
Header Files
iostream file
#include < iosteam >
This directive causes the preprocessor to add the contents of the iostream file to the program. It contains declarations for the identifier cout and the operator <<. Some old verisons of C++ use a header file called iosteam.h. This is one of the changes intruduced by ANSI c++.(We should use iostream.h if the compiler does not support ANSI C++ features.)
Header File | Contents and purpose | New version |
< assert.h > | Contains macros and information for adding diagnostics that aid program debugging | < cassert > |
< ctype.h > | Contains function prototypes for functions that test characters for certain properties, and function prototypes for functions that can be used to convert lowercase letters to uppercase letters vice versa. | < cctype > |
< float.h > | Contains the floating-point size limits of the system. | < cfloat > |
< limits.h > | Contains the integral size limits of the system | < climits > |
< math.h > | Contains function prototypes for math library functions | < cmath > |
< stdio.h > | Contains function prototypes for the standard input/ output library functions and information used by them. | < cstdio > |
< stdlib.h > | Contains function prototypes for conversion of numbers to text, text to numbers, memory allocation, random numbers, and various other utility functions. | < cstdlib > |
< string.h > | Contains function prototypes for C-style string processing functions. | < cstring > |
< time.h > | Contains function prototypes and types for manipulating the time and date. | |
< iosteam.h > | Contains function prototypes for the standard input and standard output functions. | < iostream > |
< iomanip.h > | Contains function prototypes for the stream manipulates that enable formatting of streams of data. | < iomanip > |
< fstream.h > | Contains function prototypes for functions that perform input from files on disk and output to files on disk | < fstream > |
Header File | Contents and Purpose |
< utility > | Contains classes and functions that are used |
< vector >, < list >, < deque > < queue >, < set >, < map > < stack >, < bitset > | The header files contain classes that implement the standard library containers. Containers store data during a program's execution. |
< functional > | Contain classes and functions used by algorithms of the standard library. |
< memory > | Contains classes for manipulating data in the standard library containers. |
< algorithm > | Contains functions for manipulating data in the standard library containers. |
< exception >, < stdexcept .> | These header files contain classes that are used for exception handling |
< string > | Contains the definition of class string from the standard library. |
< sstream > | Contains function prototypes for functions that perform input from strings in memory and output to strings in memory. |
< locale > | Contains classes and functions normally used by stream processing to process data in the natural form for different languages (e.g, monetary formats, sorting strings, character presentation etc.) |
< limits > | Contains a class for defining the numerical data type limits on each computer platform. |
< typeinfo > | Contains classes for run-time identification (determining data types at execution time). |