Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Write a C++ program using a concept of constructor.
SUBMITTED BY:
Nrupeshsinh
DATE:
July 4, 2016, 1:50 p.m.
FORMAT:
Text only
SIZE:
285 Bytes
Raw
Download
Tweet
HITS:
285
Go to comments
Report
# include<iostream.h>
# include<conio.h>
class myclass
{
public:
myclass()
{
int x;
cout<<"Enter value :";
cin>>x;
cout<<"X="<<x;
}
};
void main()
{
clrscr();
myclass obj; //object is created and autometically called.
getch();
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus