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();
}