why do we not pass objects by value to copy constructors

passing an object by value calls the copy constructor because a new copy is created -- and that would mean an infinite recursion. Also, it always faster to pass c++ class objects by reference than by value.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.