Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » Homework HelpRSS Feeds

Program of simple Constructions

Posted By: Liam Evans     Category: C++ Programming     Views: 1960

Write a program of simple Constructions.

Code for Program of simple Constructions in C++ Programming

#include<iostream.h>
#include<conio.h>
class data
{
    int j;
    public:
    data()
    {
        j=0;
        cout<<"Hello\n";
        cout<<"Hi Everyone\n";
    }
    void f2()
    {
        j++;
        cout<<"i ="<<j<<endl;
    }
};
main()
{
    clrscr();
    data d1,d2;
    for(int i=0;i<5;i++)
        d1.f2();
    for(i=0;i<15;i++)
        d2.f2();
    getch();
}
  
Share: 


Didn't find what you were looking for? Find more on Program of simple Constructions Or get search suggestion and latest updates.

Liam Evans
Liam Evans author of Program of simple Constructions is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!