C++

C++ is an Object Oriented language developed by Bjarne Stroustrup around the year  in 1979 at Bell Labs. It is one of the most powerful language and is mostly implemented in most of the hardware and operating systems.Most of the hardware drivers, mobile softwares, mobile drivers, motherboard drivers,Video games are made in C++ Language.

C++ provides a variety of features to its users which is mainly responsible for its Popularity.It provides multiple inheritance, automatic garbage collection, object oriented support.It also provides features such as operating overloading,exception handling and many more.

Features of C++ Language are as Follows:

1) It is Object oriented.

2) Flexible Declaration

3) Multitasking and Type Casting

4) Structure and Unioun Support

5) Support of Constructor.

6) Call By Reference and Call By Function Support

Below is a sample C++ Program.

Program to simple program to demonstrate the init graph and draw a line
from on diagonal of the screen to the other.

 #include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{  
    int gdriver = DETECT, gmode, errorcode;
    initgraph(&gdriver, &gmode, "C:\\tc\\bgi");

      errorcode = graphresult();

    if (errorcode != grOk)
    {
        printf("Graphics error: %s\n", grapherrormsg(errorcode));
        printf("Press any key to halt:");
        getch();
        exit(1);                 
    }

     int x=getmaxx()/2, y=getmaxy()/2;
    bar(x-10,y-10,x+10,y+10);

     getch();
    getch();
     closegraph();
    return 0;
}

No comments:

Post a Comment

MS SQL : How to identify fragmentation in your indexes?

Almost all of us know what fragmentation in SQL indexes are and how it can affect the performance. For those who are new Index fragmentation...