Showing posts with label c plus plus. Show all posts
Showing posts with label c plus plus. Show all posts

Today's Task is that i have to teach you cin object of iostream.
Cin is an object. It is one of the members of iostream family, and iostream is a header file.

#include<iostream.h>    // header file
#include<conio.h>        //  header file

void main()                  //  main function
{                                 //  Opening brackets of main function

       clrscr();               /*  clrscr function is used to clear the screen and it is good habit for programmers to                                           use that function in the start of every program.*/
       int var;                //   Variable Declaration
Posted by Unknown On Sunday, May 18, 2014 No comments READ FULL POST
From Today i have start a tutorials for you.
Today's Task is that i have to teach you a basic of C++.
Cout is an object. It is one of the members of iostream family, and iostream is a header file.

#include<iostream.h>    // header file
#include<conio.h>        //  header file

void main()                  //  main function
{                                 //  Opening brackets of main function

       clrscr();               /*  clrscr function is used to clear the screen and it is good habit for programmers to                                           use that function in the start of every program.*/
       int var;                //   Variable Declaration
       var = 1;              //   Value Assignment
Posted by Unknown On Sunday, May 18, 2014 No comments READ FULL POST
This program provides you a class named array. It basically Insert a data into an Array and Delete some data from an Array.

#include<iostream.h>
#include<conio.h>
class array
{
private:
int a[5],k,n;
int b[5];
public:
void insertion();
void deletion();
};
Posted by Techno crust On Friday, May 02, 2014 No comments READ FULL POST

This is the program to search an element from a sorted array.

Simply enter an sorted array at runtime and then enter the element which you want to search from an array.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a[100],n,i,beg,end,mid,item;
cout<<"length is"<<endl;
cin>>n;
cout<<"enter sorted array"<<endl;
for(i=1;i<=n;i++)
{
Posted by Techno crust On Tuesday, April 29, 2014 No comments READ FULL POST
#include<iostream.h>
#include<conio.h>
class circle
{
protected:
double radius;
public:
circle(double r);
double calclval();
};
Posted by Techno crust On Tuesday, April 22, 2014 No comments READ FULL POST
#include<iostream.h>
#include<conio.h>
class employee
{
protected:
int emp_code;
public:
employee();
void display();
};

class faculty:public virtual employee
{
protected:
char sub[10];
public:
faculty();
void display();
};
Posted by Techno crust On Monday, April 21, 2014 No comments READ FULL POST
//write a program to insert a value in specific place
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int la[5];
for(int k=0;k<4;k++)
{
cout<<"enter value of"<<k<<endl;
cin>>la[k];
}
for(k=3;k>1;k--)
Posted by Techno crust On Monday, April 21, 2014 No comments READ FULL POST
To make your own Doss Shell  / Prompt Just Write that piece of code in C++ editor such as Turboo C or any other editor and Run it..!
#include<iostream.h>
#include<conio.h>
#include<dir.h>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<fstream.h>

main(int argc , char *argv[])
{
    clrscr();
    char string[10];

    do
    {
      newstep:
              cout<<"MY Prompt>";
              gets(command);
              char *p[3];
              p[0] = strtok(command, " ");
              p[1] = strtok(NULL, " ");
              p[2] = strtok(NULL, " ");

              if (!strcmp(p[0],"help"))
              {
Posted by Unknown On Sunday, April 20, 2014 No comments READ FULL POST


A C++ language program for line drawing using Bresenham's Line Algorithm.

#include<iostream.h>
#include <conio.h>
#include<graphics.h>

void main()
{
int d=DETECT,g;
initgraph(&d,&g,"c://tc//bgi");
clrscr();
int x,y,x1,y1,x2,y2,dx,dy,c1,c2,p,color=1;
cout<<"enter points x1,y1,x2,y2";
cin>>x1>>y1>>x2>>y2;
clrscr();
Posted by Unknown On Thursday, June 06, 2013 1 comment READ FULL POST

A C++ language program for line drawing using Bresenham's Line Algorithm.

#include<iostream.h>
#include <conio.h>
#include<graphics.h>

void main()
{
int d=DETECT,g;
initgraph(&d,&g,"c://tc//bgi");
clrscr();
int x,y,x1,y1,x2,y2,dx,dy,c1,c2,p,color=1;
cout<<"enter points x1,y1,x2,y2";
cin>>x1>>y1>>x2>>y2;
clrscr();
Posted by Unknown On Sunday, June 02, 2013 1 comment READ FULL POST
// A C++ program for performing different Operations.

#include<iostream.h>
#include<conio.h>

void main()
{
int x=10;
int y=x-8;

cout<<endl<<" X = "<<x;
cout<<endl<<" Y = "<<y;
Posted by Unknown On Friday, May 24, 2013 No comments READ FULL POST

In this Animation I make a car running on a road , and a children coming from a school is also in it. The children stops at the traffic signal and wait untill the signal becomes red. And when the signal becomes Red the walk through zebra crossing. And then again traffic signal turns into yellow and then green on the green signal the car again start moving on the road.


#include<dos.h>
#include<iostream.h>
#include <conio.h>
#include<stdlib.h>
#include<graphics.h>


void main()
{
Posted by Unknown On Tuesday, May 14, 2013 No comments READ FULL POST

Today we will study how to make a car in C++ using Computer Graphics.
#include<iostream.h>
#include <conio.h>
#include<stdlib.h>
#include<graphics.h>
void main()
Posted by Unknown On Friday, April 26, 2013 3 comments READ FULL POST


Today we will study program for Pattern of stars* in C++


#include<iostream.h>

#include<conio.h>
void main()
{
 clrscr();

 int i,j,k;
Posted by Unknown On Friday, April 12, 2013 No comments READ FULL POST


C++ code for circle using circle function in Computer Graphics
#include<conio.h>
#include<math.h>
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
void main()
Posted by Unknown On Thursday, April 11, 2013 No comments READ FULL POST



C++ code for cross line using Computer Graphics

#include<conio.h>
#include<stdlib.h>
#include<math.h>
#include<dos.h>
#include<graphics.h>
void main()
Posted by Unknown On Thursday, April 11, 2013 No comments READ FULL POST

Using computer graphics C++ code for showing horizontal line on screen using putpixel function.

#include<conio.h>
#include<stdlib.h>
#include<math.h>
#include<dos.h>
#include<graphics.h>
void main()
{
Posted by Unknown On Thursday, April 11, 2013 No comments READ FULL POST
  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Like us

    as

    Contact Form

    Name

    Email *

    Message *