January 22, 2021

Static for Classes and Structs in C++



Twitter ►
Instagram ►
Patreon ►
Slack ►

Series Playlist ►

Static in a global scope ►

Check out my favourite gear for programming:
Laptop ►
Keyboard ►
Monitors ►

MAIN Camera ►
MAIN Lens ►
Second Camera ►
Microphone ►

Nguồn: https://ka-nom.com/

Xem thêm bài viết khác: https://ka-nom.com/cong-nghe/

Related Posts

JAVA 45 – TỪ KHÓA STATIC

July 9, 2020

July 9, 2020

Click theo dõi(subscribe) những bài học hay tại đây nhé: **************************** Xem thêm tại đây: Xem thêm các bài học...

How to Draw Strawberry Easy

July 9, 2020

July 9, 2020 13

Thanks for watching our Channel. how to draw strawberry fruit, how to draw strawberry easy, how to draw strawberry step...

php case change (upper to lowercase – lower to uppercase, ucupper, ucwords etc)

July 9, 2020

July 9, 2020

Now in this “php tutorial for beginners in English” video tutorial [php case change (upper to lowercase and lower to...

How To Download Stranded Deep PC For Free

July 8, 2020

July 8, 2020 41

How To Download Stranded Deep PC For Free 2019 + Gameplay Download Links : Don’t FORGET TO SUBSCRIBE! , That...

[Lập trình C/C++] Bài 44. Kiểu dữ liệu cấu trúc struct – struct là gì ?(Phần 1)

July 9, 2020

July 9, 2020 16

– struct trong ngôn ngữ lập trình nó giống như 1 kiểu dữ liệu do người lập trình định nghĩa....

Dinosaur Stomp | Mother Goose Club Playhouse Kids Song

July 13, 2020

July 13, 2020

Watch “Dinosaur Stomp” and rhyme along with your loved ones! Watch our featured videos! Buy our songs on Amazon! Visit...

DIY Planner Dashboard | Sticky Notes & Page Flags

July 13, 2020

July 13, 2020 22

Have you seen these videos? Plan with Me | Erin Condren | Bee & Honey Theme Plan with Me &...

[TUTO FR] Télécharger Gratuitement Stranded Deep Crack

July 11, 2020

July 11, 2020 21

Notre lien Instant Gaming (concours et autres): Pour gagner un jeu gratuit c’est par ici ! : Venez sur discord...

FiinGroup (Previously Stoxplus) – 10 Year Journey of Enlightening The Market

July 8, 2020

July 8, 2020

Throughout 10-year journey of business with many difficulties and challenges, FiinGroup (Previously Stoxplus) has achieved a number of remarkable accomplishments....

Huyền thoại game đối kháng trở lại!! – Street Fighter 4 cho smartphone

July 12, 2020

July 12, 2020 25

Với những ai đã từng chơi các tựa game đối kháng thì Street Fighter là một game không thể bỏ...

25 ways to use sticky notes

July 8, 2020

July 8, 2020 20

Hi! Give this video a thumbs up if you found it helpful 🙂 —————————————-­­——————- things used: goal organizer sheet: sticky...

CÔ GÁI MẠNH MẼ DO BONG SOO Tâp 10 Thuyết Minh – lồng tiếng _ Strong Woman Do Bong Soon ep 10 fu

July 8, 2020

July 8, 2020 1

Link tập 11 Phim Cô Gái Mạnh Mẽ Do Bong Soo: Park Bo Young vào vai chính Do Bong Soon...

Reacting to ASMR Videos!

July 10, 2020

July 10, 2020 49

We watch and react to various ASMR videos. Is ASMR just some stupid internet trend, or is it actually relaxing?...

Giới thiệu một số bộ Yaoi đã hoàn ( mà mình thích =)))))

July 7, 2020

July 7, 2020 4

Song : Little Girl Beat Instrumental 1 . Như chó với mèo Link : cho-voi-meo-yuugi/   Cậu sinh viên đại...

Phanmemcrack11.blogspot.com: THIẾT KẾ KẾT CẤU MÓNG ĐƠN – STCAD 4.2 FULL CRACK

July 12, 2020

July 12, 2020 8

PHẦN 2 VẼ MÓNG BĂNG VÀ TỰ ĐỘNG THỐNG KÊ THÉP 📣📣📣CÁC BẠN TẢI VỀ TẠI: KHO BÁU CỦA MÌNH...

Comments
  • "static class" title is misleading. a class cannt be static. it should be "static members". also static methods can access non-static members because they don't have "this" hidden pointer. static member data don't contribute in the memory of class objects because they are not a part from any object. struct Foo{ static int x; void foo(){} static void bar()}; int Foo::x; cout << sizeof(Foo);// 1
    * also static member functions cannot be const again because they don't have this pointer. they also cannot call non static member functions: Foo::
    void Foo::bar(){ foo(); // error foo() is not static method
    }

  • My takeaways:
    1. Static variables that are inside a class are shared between class instances 0:29, like global variables for the class
    2. Static methods have a similar effect 1:10
    3. Why we want to use static inside a class 4:50
    4. Static methods can’t access non-static variables 5:35

  • This is the first video of his I felt confused about, I'll make a mental note to learn and experiment about static from other resources, but continue on with the series

  • 3:11 Tell me that is just a hack, and that's not really how you would do that. It's so confusing, you creating a class, but then have to define stuff outside the class.

  • I have been watching the videos in correct order but now I am lost at the mention of int Entity::x; It would be good to expand this.

  • An example of this in use and i'm just guessing here would probably in speedrunners team mode where the team members share boost but then again…nvm

  • If I pass an instance pointer (or reference) to a static method, can the static method access private variables within that instance? Is it necessary to declare static member functions friends of the class or are they born with full privileges?

  • I think this is a bad video on classes cuz he keeps on having exceptions like "i'm not gonna use class, instead see my other video". "This is not written correctly but for an example".
    It just adds more to the things you don't know and everythings gets harder to understand. An explanation of a topic should focus on the topic in a regular, known-to-begginners, scenario.

  • The whole video makes sense except for the linker error at 3:00. Why would you need to manually define those variables?

Leave a Reply

Your email address will not be published. Required fields are marked *