c++ program for dynamic object - c program with parth patthar

c program with parth patthar

learn c and c++ in better way and with simple example.

Believe on your own logic

Saturday, November 24, 2018

c++ program for dynamic object

//dynamic object


#include<iostream.h>
#include<conio.h>
class data
{
int a,b;
public:
data(int x,int y)
{
a=x;
b=y;
}
void put()
{
cout<<a<<b;
}
};
int main()
{
int a,b;
cin>>a>>b;
data d1(a,b);
d1.put();
getch();
return(0);
}

No comments:

Post a Comment