© 2012 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
Quick Links
Easy Studies
« NS2  Projects »

Home Lab Exercise Object Oriented Programming Lab Exercise ProgramsCPP Program For Parameterized Constructor▼

CPP Program For Parameterized Constructor

Alogarithm steps:

  1. Start the program
  2. Write the function and pass one value through that function
  3. Call that function in the main program
  4. Pass the value when we call that function
  5. Compile and run the program

CPP Program For Parameterized Constructor

#include #include const int IN = 1; const int checked_out = 0; class book { char author[40]; char title[40]; int status; public: book(char *n, char *t, int s); int get_status() { return status; } void set_status(int s) { status = s; } void show(); }; book::book(char *n, char *t, int s) { strcpy(author, n); strcpy(title, t); status = s; } void book::show() { cout<


Tom SawyerbyTwainisin.

Moby DickbyMelvilleis

SLogix Student Projects

⇓ Student Projects ⇓
⇑ Student Projects ⇑