iostream File:
#include<iostream.h> |
- The Header File iostream should be included at the beginning of all Programs.
- It contains declarations for the identifiers Cout , Cin and the << , >> Operators.
- Some old versions of C++ use a Header File called iostream.h .
- We should use iostream.h if the compiler does not support ANSI C++ Feature.
- If the compiler support ANSI C++ Feature then we use iostream .
#include<iostream> |
Some Header Files are :
- <time.h> contains Function prototypes and types for manipulating the time and date.
- <iomanip.h> contains functions prototypes for the Standard Input and Standard output Functions.
- <iomanip.h> contains Function prototypes for the stream manipulators that enable formatting of streams of data.
- <fstream.h> contains Function prototypes for that performs Input from Files on disk and output to File on disk.
New Header Files included in ANSI C++ :
- <algorithm> contains Functions for manipulating data in the Standard Library containers
- <iterator> contains classes for manipulating data in the Standard Library containers.
- <string> contains the definition of class string from the Standard Library.
Namespace :
- Namespace is a new concept introduced by the ANSI C++ standard commitee.
- This defines a scope for the identifiers that are used in a program.
- For using the identifiers defined in the namespace scope we must include the using directory.
Using namespace std ; |
- Here, std is the namespace where ANSI C++ standard class Libraries are defined.
- All the ANSI C++ Programs must include this directive.
- using and namespace are the New keywords of C++.
Comments:
- C++ introduces a new comment symbol // (double slash).
- Comments start with a double slash symbol and terminates at the end of the line.
- A comment may start anywhere in the Line.
- Note that There is no closing symbol.
- The double slash comment is basically a single line comment. Multi Line comments can be written as
// Features of C++, // Important Concepts and // Programming Functions . |
- The C comment symbol /* */ are more suitable for Multi Line comment.
/* Features of C++ , Important Concepts and Programming Functions. */ |
0 Response to "Tutorial on Basic Concepts of C++ Program Part 2"
Post a Comment