Byte-Sized-Chunks: Operator Overloading in C++
0.0 (0 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
59 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Byte-Sized-Chunks: Operator Overloading in C++ to your Wishlist.

Add to Wishlist

Byte-Sized-Chunks: Operator Overloading in C++

Assignment, Pre- and Post-Increment, And Streaming Operators Will Make So Much Sense Now!
0.0 (0 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
59 students enrolled
Created by Loony Corn
Last updated 3/2016
English
Current price: $10 Original price: $20 Discount: 50% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 2 hours on-demand video
  • 8 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?
What Will I Learn?
Get exactly right the semantics of operator overloading for all important operators
Understand the precise issues involved in assignment operators, pre- and post-increment and other arithmetic operators
Use friend operators, such as the >> and << operators
View Curriculum
Requirements
  • Students should have an understanding of programming - concepts such as variables, loops and if-else statements will not be explained
  • Students should have some basic working knowledge of C++, Java or C#
Description

Note: This course is a subset of our much longer course 'Learn By Example: C++ With 75 Solved Examples' so please don't sign up for both:-)

Like a gruff uncle, C++ seems intimidating, when its just being helpful. These examples will help you understand that.

Let's parse that.

  • C++ seems intimidating because all too often, what you see is not what you get.
  • Usually, that's because C++ is trying to help you, but you don't realise that. C++ is incredibly deep, and it sometimes struggles to get you - the programmer - to understand what it's saying
  • These examples will help. Each is self-contained, has its source code attached, and gets across a specific C++ use-case. Each example is simple, but not simplistic.

Operator overloading is a particularly complicated topic - C++ is virtually alone in the ubiquity of overloaded operators. Make sure this doesn't trip you up.

  • What is operator overloading? Understand internal operators, defined as member functions of a class vs external operators defined as global functions. External operators are commonly friend functions of the class on which they operate.
  • Internal or External? When would you choose to have an internal operator implementation vs an external operator implementation? Sometimes you don't have a choice!
  • The += operator
  • The assignment operator
  • Pre- and Post-Increment
  • Streams and the >> and << operators
Who is the target audience?
  • Nope! Please don't enroll for this class if you have already enrolled for our 15-hour course 'Learn By Example: C++ Through 75 Solved Examples'
  • Yep! Java and C# programmers - who understand Object Oriented Programming, but are new to C++
  • Yep! Folks with prior programming experience in C. Some prior object oriented programming experience is recommended
  • Yep! C++ programmers looking to get the little details of operator overloading exactly right
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 9 Lectures Collapse All 9 Lectures 01:52:20
+
Overloaded But Still Productive!
9 Lectures 01:52:20

What is operator overloading? Understand internal operators, defined as member functions of a class vs external operators defined as global functions. External operators are commonly friend functions of the class on which they operate.
Preview 15:55

When would you choose to have an internal operator implementation vs an external operator implementation? Sometimes you don't have a choice!
Choosing between internal and external implementations
09:21

All the nitty gritty details to get the += correct. With operator overloading the function signatures are the most complicated, pay close attention to those. Why does this operator return a reference?
Example 44: Overloading the += operator
14:41

All the nitty gritty details to get the + operator correct. With operator overloading the function signatures are the most complicated, pay close attention to those. Why does this operator return a const object?
Example 45: Overloading the + operator
12:59

The "++" operator can mean the pre-increment or the post-increment operator. How does C++ disambiguate?
Example 46: Overloading the ++ (and --) operators
15:10

This is the operator that's implemented the most often! It's also tricky and has many details which have to be exactly right.
Example 47: Overloading the assignment operator
19:48

A flashback to how streams and buffers work in C and C++.
Operator Overloading - Streams Flashback
07:31

The bitwise shift operators work with input and output streams when overloaded. Learn how to make your custom classes work with IO steams using operator overloading.

Example 48: Overloading the << and >> operators
15:28
About the Instructor
Loony Corn
4.3 Average rating
3,264 Reviews
25,999 Students
65 Courses
A 4-person team;ex-Google; Stanford, IIM Ahmedabad, IIT

Loonycorn is us, Janani Ravi, Vitthal Srinivasan, Swetha Kolalapudi and Navdeep Singh. Between the four of us, we have studied at Stanford, IIM Ahmedabad, the IITs and have spent years (decades, actually) working in tech, in the Bay Area, New York, Singapore and Bangalore.

Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft

Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too

Swetha: Early Flipkart employee, IIM Ahmedabad and IIT Madras alum

Navdeep: longtime Flipkart employee too, and IIT Guwahati alum

We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!

We hope you will try our offerings, and think you'll like them :-)