Click here to load reader
Upload
shashank12march
View
81
Download
0
Tags:
Embed Size (px)
Citation preview
2. Structure of a Program216 August 2012 3. Structure of a Program #include - Lines beginning with a hash sign (#) are directivesfor the preprocessor.- In this case the directive #include tellsthe preprocessor to include the iostream standardfile.- This specific file (iostream) includes the declarationsof the basic standard input-output library in C++.316 August 2012 4. Structure of a Program using namespace std;- All the elements of the standard C++ library are declaredwithin what is called a namespace, the namespace withthe name std. int main()-This line corresponds to the beginning of the definition of themain function. - The main function is the point by where all C++ programs starttheir execution, independently of its location within the source code.4 16 August 2012 5. Structure of a Program cout