Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* parameterized cons.....*/
- #include<stdio.h>
- #include<conio.h>
- #include<iostream.h>
- class xyz
- {
- public:
- xyz()//default cons
- {
- cout<<"\nI am default cons..";
- }
- xyz(int x,int y)
- {
- cout<<"\nI am parameterized cons...";
- cout<<"\nValue of x is "<<x<<" and y is "<<y;
- }
- };
- int main()
- {
- clrscr();
- xyz x1,x2(10,20);
- getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment