Copy Constructor.docx

  • Uploaded by: shubham mishra
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Copy Constructor.docx as PDF for free.

More details

  • Words: 57
  • Pages: 1
#include #include class copy { int x; public: copy() //default constructor { x = 0; } copy(int a) //parameterized constructor { x = a; } copy(copy &ob) { x = ob.x; } void display(); }; void copy::display() { cout<<"\n The value of object2 is:"<<x; } int main() { clrscr(); copy ob1(10); copy ob2(ob1); ob2.display(); getch(); return(0); }

Related Documents


More Documents from "Cesar Leonardo Najera Vleeschower"

Copy Constructor.docx
November 2019 10
Jsw Report 2018.pdf
October 2019 13
Tech Seminar.docx
November 2019 13
Rent Agreement.pdf
May 2020 27
Final.docx
May 2020 0