C++ Programming Tutorial 90 - Getters and Setters

  Рет қаралды 31,626

Caleb Curry

Caleb Curry

Күн бұрын

Пікірлер: 25
@meep3832
@meep3832 3 жыл бұрын
shawty support group made my day haha v helpful video ty
@PunmasterSTP
@PunmasterSTP 3 жыл бұрын
Underscore? More like an over-score, of educational videos for KZbin! Thanks again so much for making this awesome tutorial series.
@shreyaesha001
@shreyaesha001 2 жыл бұрын
shawty support group :)
@cortisol_induced_coma
@cortisol_induced_coma 2 жыл бұрын
Bro I don't wanna get up either 😔✊
@ljubaceranic937
@ljubaceranic937 2 жыл бұрын
"shawty support group"
@vegansynths7757
@vegansynths7757 4 жыл бұрын
Ah. That underscore method is really going to help me as a beginner because I'm getting confused when you name things the same even though they are two different things. (please note the educated use of the word 'things'.)
@praveenpeiris3576
@praveenpeiris3576 2 жыл бұрын
2:30 XD
@marebot404
@marebot404 4 жыл бұрын
i'm curious: why are you not using "using namespace std;" at the beginng? then you wouldn't need to write "std::" in front of everything.
@ManishSharma-eu4wy
@ManishSharma-eu4wy 4 жыл бұрын
To avoid naming conflict, he spoke about that in some past video. Generally, writing "std::" is a good practice to avoid some errors and having a better understanding of the code.
@joepeters8746
@joepeters8746 4 жыл бұрын
eg. you want to use great extern libery for some stuff, which has a string to implemented.
@OmegaF77
@OmegaF77 4 жыл бұрын
Status is now a weird looking word.
@THE_joshbeoulve
@THE_joshbeoulve 3 жыл бұрын
My school's module says that setters should never assign values to their referenced properties and it reeked of bull. This pretty much confirms it.
@chudchadanstud
@chudchadanstud 10 ай бұрын
Can you provide a more clear explanation?
@midas_9648
@midas_9648 3 жыл бұрын
great vid.. btw how do i create a setter for a string* ? could you advise ? :) ty
@brocklesnarufcchamp1
@brocklesnarufcchamp1 3 жыл бұрын
So the function get_status() will be the getter, am I right?
@pierfrancescopeperoni
@pierfrancescopeperoni 3 жыл бұрын
Yes
@PunmasterSTP
@PunmasterSTP 3 жыл бұрын
Looks like you *got* it!
@shaunmak8037
@shaunmak8037 4 жыл бұрын
What is the color theme you're using, its amazing @Caleb Curry
@MrXavitaker
@MrXavitaker 4 жыл бұрын
I believe it's Solarized Light
@manu-mm4pc
@manu-mm4pc 2 жыл бұрын
what about when the attribute is a pointer how do set and get? bool* val;
@CaptainZhariff
@CaptainZhariff 4 жыл бұрын
What does "this -> status = status" means? Especially the functionality of ->
@michaelmatela4582
@michaelmatela4582 4 жыл бұрын
According to what I understood we're saying status (member of a class) is equal to status (the parameter).
@chimpspecialist
@chimpspecialist 4 жыл бұрын
I'm also confused why we need to use "this->" syntax. What does "this" refer to?
@joepeters8746
@joepeters8746 4 жыл бұрын
@@chimpspecialist "this" is a pointer pointing to the Object itself, that is passed implicitly when you call a member function. "->" is the same as "(*this)." Bec. this is a pointer, you cant have acces with a dot, but you first have to get the value of the object the pointer points to, than you can get the value with a dot.
@vanchark
@vanchark 2 жыл бұрын
"this" is a keyword in C++ that refers to the pointer of an object. A pointer is a type of variable that stores the memory address of a variable or class object. "->" means go to that memory address stored in the pointer. So, "this -> status = status" means go to this object's memory address, and at that memory address, change its "status" attribute to the value of status. I hope this cleared things up.
C++ Programming Tutorial 91 - Static Data Members
8:10
Caleb Curry
Рет қаралды 17 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,2 МЛН
The FASTEST way to PASS SNACKS! #shorts #mingweirocks
00:36
mingweirocks
Рет қаралды 17 МЛН
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 104 МЛН
Blue Food VS Red Food Emoji Mukbang
00:33
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 37 МЛН
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 30 МЛН
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Рет қаралды 361 М.
Getters & Setters | C++ | Tutorial 30
12:41
Giraffe Academy
Рет қаралды 65 М.
Destructor Basics | C++ Tutorial
9:13
Portfolio Courses
Рет қаралды 19 М.
C++ OOP - What is encapsulation in programming?
11:21
CodeBeauty
Рет қаралды 142 М.
Public And Private Access Specifiers | C++ Tutorial
8:49
Portfolio Courses
Рет қаралды 39 М.
Constructor Basics | C++ Tutorial
7:08
Portfolio Courses
Рет қаралды 23 М.
C++ GETTERS & SETTERS explained easy 🔒
6:12
Bro Code
Рет қаралды 10 М.
Constructors in C++
6:58
The Cherno
Рет қаралды 423 М.
Class Member Functions (aka Methods) | C++ Tutorial
7:18
Portfolio Courses
Рет қаралды 28 М.
The FASTEST way to PASS SNACKS! #shorts #mingweirocks
00:36
mingweirocks
Рет қаралды 17 МЛН