Static Member Functions | C++ Tutorial

  Рет қаралды 10,901

Portfolio Courses

Portfolio Courses

Күн бұрын

Пікірлер: 11
@_Rodrigues-jc3nf
@_Rodrigues-jc3nf 5 ай бұрын
I sure as hell that i will recomend you to my friends. I wish that you could be my professor!!!!! :)
@Huffer7
@Huffer7 Жыл бұрын
Very well explained!
@dzentsetsu5607
@dzentsetsu5607 2 жыл бұрын
Thank you for good tutorial. Have a question. Where is it okay to initialize static variable? Should it be initialized in header or cpp file? And another question is it considered bad practice to make static variable public?
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
You're welcome! And great questions too! 🙂 We shouldn't initialize the static variable in the header, this is a good thread as to why: stackoverflow.com/questions/22869788/why-should-i-not-initialize-static-variable-in-header. I've never heard that it's a bad practice to make static variables public, I think it would depend on what they are being used for.
@dzentsetsu5607
@dzentsetsu5607 2 жыл бұрын
@@PortfolioCourses 🙏🙏🙏
@stonedcodingtom9097
@stonedcodingtom9097 Жыл бұрын
Very good explanation
@PortfolioCourses
@PortfolioCourses Жыл бұрын
Thank you very much for the positive feedback, I'm glad you enjoyed the explanation! :-)
@ValliNayagamChokkalingam
@ValliNayagamChokkalingam Жыл бұрын
Thank you! Private variables cannot be defined/initialized outside the class but private static variables can be initialized outside the class using ::, right?
@PortfolioCourses
@PortfolioCourses Жыл бұрын
Yes that's true, though I believe private static variables *must* be initialized outside of the class (though if you really deep drive research it you may find there is some nuance there, I think a couple types of static members can be technically be initialized in the class).
@nejatakar7641
@nejatakar7641 2 жыл бұрын
You guys are the best !!!
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
Thank you Nejat! :-)
Declare And Initialize An Array Of Objects | C++ Tutorial
9:14
Portfolio Courses
Рет қаралды 16 М.
Member Initializer Lists | C++ Tutorial
23:10
Portfolio Courses
Рет қаралды 9 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 77 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 10 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 206 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 5 МЛН
Function Pointers | C Programming Tutorial
18:31
Portfolio Courses
Рет қаралды 66 М.
Static Data Member And Static Member Function In C++
17:19
CppNuts
Рет қаралды 52 М.
Operator Overloading Using Friend Functions | C++ Tutorial
15:04
Portfolio Courses
Рет қаралды 10 М.
Static for Classes and Structs in C++
9:12
The Cherno
Рет қаралды 359 М.
Friend Functions | C++ Tutorial
13:05
Portfolio Courses
Рет қаралды 10 М.
Object Assignment | C++ Tutorial
16:23
Portfolio Courses
Рет қаралды 7 М.
Learn C++ With Me #20 - Functions
26:14
Tech With Tim
Рет қаралды 52 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 824 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 122 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 77 МЛН