Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<conio.h>
- class IntArray
- {
- private:
- int ary[5];
- public:
- IntArray(int a[])
- {
- for(int z=0;z<5;z++)
- {
- ary[z]=*a;
- }
- }
- void dis()
- {
- for(int i=0;i<5;i++)
- {
- cout<<ary[i]<<"\t";
- }
- }
- };
- void main()
- {
- clrscr();
- int x[5]={3,7,9,10,4};
- IntArray obj(x);
- obj.dis();
- }
Add Comment
Please, Sign In to add comment