Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

create copy constructor c++

// Copy constructor 
    Point(const Point &p2) {x = p2.x; y = p2.y; } 
  
    int getX()            {  return x; } 
    int getY()            {  return y; } 
}; 
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #create #copy #constructor
ADD COMMENT
Topic
Name
8+2 =