Original Post
Welcome to the GDNet C++ Workshop – Ch. 10
For a complete introduction to this workshop, please look here. Workshop Overview This workshop is designed to aid people in their journey to learn beginning C++. This workshop is targeted at highly motivated individuals who are interested in learning C++ or who have attempted to learn C++ in the past, but found that without sufficient support and mentoring they were unable to connect all the pieces of this highly complex but powerful programming language. This is a 'guided' self-teaching C++ workshop. Each student is responsible for taking the time to read the material and learn the information. The community and tutors that arise out of this workshop are here for making the learning process run more smoothly, but are not obligated to baby-sit a person's progress. Because everyone will be working from the same textbook (Teach Yourself C++ in 21 days 5th Ed.), students may find it easier to get answers to the specific questions they might have. There is no minimum age requirement, and there is no previous programming experience required. Additionally, this workshop does not attempt to defend C++ as a language, nor does it attempt to demonstrate that C++ is either more or less useful then other programming languages for any particular purpose. People who intend to start a discussion about the differences between C++ and ANY other languages (except as are relevant to a particular discussion), are encouraged to do so elsewhere. This workshop is for educational, not philosophical discussions. Quizzes & Exercises Each week will have quizzes and exercises posted in the weekly threads. Please try and answer them by yourself. As well, please DO NOT post the answers to Quizzes and Exercises within this thread. Once it becomes acceptable to post the answers to quizzes and exercises, an additional thread will be created each week specifically for the purpose of posting quiz answers. If you try with reasonable effort but are unable to answer the questions or complete the exercises, feel free to post a clarification question here on the thread. Tutors, myself, or others will do the best we can to point you in the right direction for finding the answer.Chapter 10 – Working with Advanced Functions
Introduction Heya all! Welcome back to the workshop...sorry I've kept you all waiting. There are many reasons for my absence, but the most relevant is that my computer melted when the CPU fan and Northbridge fan on my motherboard simultaneously stopped functioning. At any rate... This week is chapter 10. We will be focusing more on overloading member functions, operators, and constructors. We'll also take a look at initializer lists, the copy constructor, and type converters. The chapter for this week is roughly 35 pages. The primary purposes for the things learned in this chapter are convenience. By providing intelligent constructors, copy constructors, and the ability to overload operators you can make the interactions with your object more efficient and more intuitive. I will also be posting the information for Project 1 VERY soon, and it will be active for 4 weeks. People will need to draw not only from what we've learned, but from what we will learn over the next 4 weeks in order to complete the project successfully. Please remember to use OPINION and WARNING tags whenever applicable. As well, feel free to post your own insights, and review questions or exercises beginning Wednesday or Thursday. Outline of the Reading - Chapter 10- Overloaded Member Functions
- Using Default Values
- Choosing Between Default Values and Overloaded Functions
- The Default Constructor
- Overloading Constructors
- Initializing Objects
- The Copy Constructor
- Operator Overloading
- Handling Data Type Conversion
- Conversion Operators