Sunday, 29 July 2012

Learning C++ :Chapter 1

CHAPTER 1
C++ language was developed by Bjarne Stroutstrup. It called the language as " C with classes".So this language was given the name " C++ ".


IMPORTANT FEATURES:

  • C++ language uses classes.
  • The extension of C++ file is .cpp
  • C++ language is case sensetive.
  • Compiler is used in C++ to compile the program.
  • Three files are created after compiling program: .cpp .obj and .exe


Now this was only about the developer of C++.
Now lets begin with programming.Programming refers to creating programs which afterwards are combined to form a software.


Now we should start with Just a Simple C++ Program:


Type in your Computers
:

#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
cout<<"Hello World";
getch( );
}

Now lets find out what does this program displays:


Hello World




In this program:
#include<iostream.h> and #include<conio.h>  are the two header files which contain the functions (predefined) .In this program COUT function is a prototype of IOSTREAM.H and GETCH is the prototype of CONIO.H 


clrscr( ); is used to clear the screen.It is the prototype of Conio.h
cout refers to CONSOLE OUTPUT. It is used to display the required data.Such as in this case we have displayed "Hello World".




Now I think You are clear enough about what is C++ and how programming  begins.


Please Visit: C++ beginners  section for Second Lesson

No comments:

Post a Comment