Tutorial on Basic Concepts of C++ Program Part 2

Engg.... | 00:52 | | Best Blogger Tips
C++

 iostream File:



   #include<iostream.h>  

  1. The Header File iostream should be included at the beginning of all Programs. 
  2. It contains declarations for the identifiers Cout , Cin and the << , >> Operators. 
  3. Some old versions of C++ use a Header File called iostream.h
  4. We should use iostream.h if the compiler does not support ANSI C++ Feature.
  5. If the compiler support ANSI C++ Feature then we use iostream .


   #include<iostream>  


 Some Header Files are :
  1. <time.h>  contains Function prototypes and types for manipulating the time and date. 
  2. <iomanip.h> contains functions prototypes for the Standard Input and Standard output Functions. 
  3. <iomanip.h> contains Function prototypes for the stream manipulators that enable formatting of streams of data. 
  4. <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++ : 
  1. <algorithm> contains Functions for manipulating data in the Standard Library containers
  2. <iterator> contains classes for manipulating data in the Standard Library containers. 
  3. <string> contains the definition of class string from the Standard Library.

Namespace :
  1. Namespace is a new concept introduced by the ANSI C++ standard commitee. 
  2. This defines a scope for the identifiers that are used in a program. 
  3. 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. 
  */


Please Share it! :)
Do you like this Story?

Get Free Email Updates Daily!

Follow us!

1 comment:

  1. Appreciation for nice Updates, I found something new and folks can get useful info about BEST ONLINE TRAINING

    ReplyDelete