January 19, 2021

Static in C++

Twitter ►
Instagram ►
Patreon ►
Slack ►

Series Playlist ►

Static in a class scope ► Coming soon…

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

Cách khác phục không vào được store trên win 10

July 11, 2020

July 11, 2020 12

Kiếm tiền thụ động 2-3$ ngày : không vào được store trên win 10 windows store vào store trên win...

Multiple Stroke Layer Effect | Photoshop Tutorial

July 8, 2020

July 8, 2020 42

In this Photoshop tutorial, learn how to add multiple strokes to layer styles in order to create cool outline effects....

Learn C++ | atoi vs stoi – part 1

July 11, 2020

July 11, 2020 3

This is the difference between atoi and stoi in converting a string to a integer. If someone doesn’t need string...


July 12, 2020

July 12, 2020 46

STATIC VARIABLE OR STATIC DATA MEMBER In this video we will learn the Static Keyword in C++. We will learn...

Note Blocks – Animation vs. Minecraft Shorts Ep. 5 (music by AaronGrooves)

July 10, 2020

July 10, 2020 50

Warning: the song in this animation is very catchy. Become a patron: Original Music by AaronGrooves: Song available on Bandcamp:...

Descargar, instalar y activar Stellar Data Recovery Professional 9 – Última versión – Links directos

July 7, 2020

July 7, 2020 38

En esta ocasión les traigo este software de recuperación de datos con funciones de reparación de fotos y videos: –...

SIÊU Tóm Tắt Season 5 | Steven Universe

July 10, 2020

July 10, 2020 24

SIÊU Tóm Tắt Season 5 | Steven Universe Script: Vũ Thuần Voice: Huy Anh Video: Sơn Nguyễn ► Subscribe: ►...

hexadecimal string to byte array in java

July 12, 2020

July 12, 2020 1

Program that translates an hexadecimal string into a byte array in Java 1) Manual version 2) Using javax.xml.bind.DatatypeConverter Like and...

Stick War Legacy⚔Sử Dụng Tất Cả Item Cùng Lúc Sẽ Như Thế Nào⚔KasubukTQ

July 10, 2020

July 10, 2020 39

Stick War Legacy | Mod 999999999 Giant Lava siêu mạnh | Stick War Legacy Hack | KasubukTQ ⬇️Cách tải game...

Hướng dẫn tải và cài đặt Stranded Deep Full Crack 2020 – Daominhha.com

September 8, 2020

September 8, 2020 15

Tải game Stranded Deep miễn phí Google Drive, Hướng dẫn cài đặt Stranded Deep Full Crack PC, Cách tải game...

Hướng dẫn tải và cài đặt game Stranded Deep – Game sinh tồn có tính chất gây nghiện

July 8, 2020

July 8, 2020 50

Hướng dẫn tải và cài đặt game Stranded Deep – Game sinh tồn có tính chất gây nghiện – Link...

[Khóa học sử dụng SQL server] – Bài 29: Store trong SQL| HowKteam

July 9, 2020

July 9, 2020 13

[Khóa học sử dụng SQL server] – Bài 29: Store trong SQL| HowKteam Nếu các bạn thấy hay thì hãy...

How To download and install staruml || StarUml- How to make uml diagrams

September 7, 2020

September 7, 2020

In this video I am going to tell you how to download and install Staruml. Staruml is a tool which...

[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...

How to Get All Steam Games For Free!! 100% Worked (PROVED)

July 9, 2020

July 9, 2020

💌In this video i will show you How to get 3500+ Steam Gamez for Free!! Watch full video for better...

  • Ok, you set the function in the non-main file to be static, but the function on the main file is not static, wouldn't this one get in conflict with the static one inside the non-main file?

  • The best C++ series that I saw. This is not a "do this, do that" manual, You shows really knowledge about You talk. Thank You!

  • AWESOME Presentation!
    static in a class means its public, shared, and the same (for that class) and
    static outside a class means its private (for that file)
    fantastic, I don't feel so dumb after realizing how dumb this is.
    Thank you sir.

  • Maybe something has changed but I don't get a linking error after removing the static keyword from s_Variable in Static.cpp

    Edit: I figured it out. I was creating a new file with 'ctrl + n' which by default created the file outside of the same solution so I guess the linker wasn't finding that variable. I added the new file through the solution explorer and was able to reproduce.

  • How does the compiler see the variable in Static.cpp if you’re not explicitly doing the #include?

  • As a java/kotlin programmer, I knew to learn CPP was going to be difficult, but I didn't expect the difficulty coming from the language being this inelegant/ugly. In Java the keywords don't change their meaning this radically

  • So around 2:10 main.cpp can only see the s_Variable defined in the main.cpp because the one in static.cpp is defined as static. But during the compilation of static.cpp, wouldn't it see both variables (one in static.cpp and one in main.cpp as main.cpp wasn't declared to be static). So how is the program running successfully?

  • In lua to make something local to a translation unit, you just call it "local x = 10"

    So why did they choose to name it "static" and not local?

  • What exactly is this "translation unit" of which you speak? You make it sound like a source file, but I happen to know that global functions can also define static variables.

  • Wait… I do not get this as clearly as I want. So basically, he says that two global variables can not have same name then does that mean I can not have a variable x in two different cpp files? Because, we can have same name for variables as long as they are in different cpp files. Also, how does this main.cpp know that a variable with the same name has been declared before but in another cpp file? I mean, for a file to be present in another file, there needs to be some sort of #include pre-processor, right? I Have watched the linking and compiling videos, but I still do not get this. If anyone can explain this, it would benefit all of us here. Thanks a ton in advance

  • The value of the static variable also remains the same across all the instances of the class, every object of such class share and keep the same value of that common static variable. If you change the value of this static variable from object1, it also changes value in every other object of that class.

  • At 3:10 you mentioned the linker will not see in the global scope, and you said 'try compile my code' and got linking error, you mean you actually built it and not only compile?

  • 'static' is such a strange keyword to use for variables outside of a class. It would make more sense to use 'private', no?

  • There is a meaning for static keyword inside functions. It will persists the value of local variable despite of calls.

  • The current number of views (49300) doesn't do you justice but judging by the rate it's growing (~100 in the last half hour) it should hopefully get really high soon.

Leave a Reply

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