Week 14 Day 3 - The Arrow Operator and The Ternary Operator in C++

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=q6pxkqOgRJE



The Operator
Game:
Duration: 1:11:36
121 views
1


Today we ran through three topics:

1) Searching a vector of objects by various fields in the object, like by name or by pokedex number

2) The arrow operator. When you have a pointer to an object you use the arrow operator just like the dot (.) operator in C++

3) The ternary operator which allows you to embed something like an if statement inside of an expression. An expression is anything that can be put into a parenthesis or on the right side of an =. It takes the format like this:

(x ? a : b)

If x is true, then the expression within the parentheses evaluates to a, otherwise it evaluates to b.

I also showed a reasonable use of pointers that helps simplify your code.







Tags:
csci 40
ternary operator
c++
arrow operator
pointers
searching



Other Statistics

The Operator Statistics For Bill Kerney

There are 121 views in 1 video for The Operator. There's close to an hours worth of content for The Operator published on his channel, making up less than 0.13% of the total overall content on Bill Kerney's YouTube channel.