Write a C++ program using a concept of constructor.


SUBMITTED BY: Nrupeshsinh

DATE: July 4, 2016, 1:57 p.m.

FORMAT: Text only

SIZE: 221 Bytes

HITS: 343

  1. # include<iostream.h>
  2. # include<conio.h>
  3. class myclass
  4. {
  5. public:
  6. myclass()
  7. {
  8. cout<<"Hello..";
  9. }
  10. };
  11. void main()
  12. {
  13. clrscr();
  14. myclass obj; //object is created and autometically called.
  15. getch();
  16. }

comments powered by Disqus