O'Reilly logo

SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overloaded Constructors

Prior to this lesson, you'd seen the use of overloading already—with the constructor and copy constructor for aRequest (Lesson 17, “Classes: Structures with Functions”).

A constructor is a member function with a name that happens to be the name of the class. Like any overloaded member function, it has a signature that the compiler uses for overload resolution. As with overloaded functions, you shouldn't use default arguments for overloaded constructors.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required