<P> In C and C++ , the # include preprocessor directive causes the compiler to replace that line with the entire text of the contents of the named source file ( if included in quotes : `` '' ) or named header ( if included in angle brackets : < > ) ; note that a header need not be a source file . Inclusion continues recursively on these included contents , up to an implementation - defined nesting limit . Headers need not have names corresponding to files : in C++ standard headers are typically identified with words , like `` vector '' , hence # include < vector > while in C standard headers have identifiers in the form of filenames with a ``. h '' extension , as in # include < stdio. h > . A `` source file '' can be any file , with a name of any form , but is most commonly named with a ``. h '' extension and called a `` header file '' ( sometimes ``. hpp '' or ``. hh '' to distinguish C++ headers ) , though files with . c , . cc , and . cpp extensions may also be included ( particularly in the Single Compilation Unit technique ) , and sometimes other extensions are used . </P>
<P> In C and C++ , the # include preprocessor directive causes the compiler to replace that line with the entire text of the contents of the named source file ( if included in quotes : `` '' ) or named header ( if included in angle brackets : < > ) ; note that a header need not be a source file . Inclusion continues recursively on these included contents , up to an implementation - defined nesting limit . Headers need not have names corresponding to files : in C++ standard headers are typically identified with words , like `` vector '' , hence # include < vector > while in C standard headers have identifiers in the form of filenames with a ``. h '' extension , as in # include < stdio. h > . A `` source file '' can be any file , with a name of any form , but is most commonly named with a ``. h '' extension and called a `` header file '' ( sometimes ``. hpp '' or ``. hh '' to distinguish C++ headers ) , though files with . c , . cc , and . cpp extensions may also be included ( particularly in the Single Compilation Unit technique ) , and sometimes other extensions are used . </P>
what is the use of include in c++
what is the use of include in c++
causes the compiler to replace that line with the entire text of the contents of the named source file ( if included in quotes : `` '' ) or named header ( if included in angle brackets : < > )
causes the compiler to replace that line with the entire text of the contents of the named source file ( if included in quotes : `` '' ) or named header ( if included in angle brackets : < > )