STATIC VARIABLE OR STATIC DATA MEMBER IN C++ -24

  Рет қаралды 84,883

Codearchery

Codearchery

Күн бұрын

STATIC VARIABLE OR STATIC DATA MEMBER
In this video we will learn the Static Keyword in C++.
We will learn about Static Variables , their syntax and
Simple Program to understand the concept clearly.
We will see Difference between a Regular and a
Static Variable In C++ as well as Properties of Static Variable
Enjoy Learning.
Note :- "A C++ program can run successfully without a return statement (return 0) "
Mail: Aniproguy@gmail.com
Music:SUNDAY MORNING by Nicolai Heidlas Music / nicolai-heidlas
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons....
Music provided by Audio Library • Video
------------------------------------------------------------------------------------------------
Suggested Videos
Function Overloading (FUNCTION IN C++ - PART 4) :- • Function Overloading (...
Void or Generic Pointer in c++ :- • Void or Generic Pointe...
Variables and Data Types in C++ :- • Variables and Data Typ...
Data Type Range in C++ :- • Data Type Range in C++...
Comments in C++:- • Comments in C++ -7
Inline Function - FUNCTION IN C++ (PART - 3) :- • Inline Function - FUNC...
Function Overloading (FUNCTION IN C++ - PART 4)
• Function Overloading (...
Class and Objects(part-3)[VISIBILITY MODES IN C++] :- • Class and Objects(part...
Class and Objects[Most Important Video] Part-5 (Complex Number Program)
• Class and Objects[Most...
STATIC FUNCTIONS IN C++ :- • STATIC FUNCTIONS IN C+...
CONSTRUCTOR IN C++ ( SYNTAX AND PROGRAM AND ALL POSSIBLE ERRORS)
• CONSTRUCTOR IN C++ ( S...
STATIC VARIABLE OR STATIC DATA MEMBER IN C++ :- • STATIC VARIABLE OR STA...
Constructor Overloading in C++- :- • Constructor Overloadin...

Пікірлер: 129
@soniyapol5755
@soniyapol5755 3 жыл бұрын
I was not getting the concept the whole semister ....then thought to give up on this point ..but came across ur video ...i m now crystal clear with the concept....thanks❤️
@nguyengiorno9026
@nguyengiorno9026 Жыл бұрын
how was your progress?
@Misc_useful
@Misc_useful 7 жыл бұрын
world needs teachers like you...!!! good
@Codearchery
@Codearchery 7 жыл бұрын
Thanks Vikranth for such a wonderful Comment. Everything is Simple , I don't know why teacher made them look like hard
@AbhijitDas-un2rr
@AbhijitDas-un2rr 5 жыл бұрын
Made me understand in a Minute at which I was struck for a year. Thanks pal !
@rabindramahato6950
@rabindramahato6950 Жыл бұрын
Amazing 👏 🙀 😯
@ishaan854
@ishaan854 6 ай бұрын
Aweosme❤❤
@tranthaptinh
@tranthaptinh 4 жыл бұрын
I LIKE YOU ...... YOU ARE VERY GOOD DRAWING ............... YOU HAVE VERY HAPPY FUNNY TO FIND INTERESTING TO LEARN .............. THE MOST IMPORTANT HOW TO TEACH THE EASY WAY TO STUDY ...THE MOST SIMPLE BUT FUNDAMENTALS ....... PLATFORM
@skyblue3044
@skyblue3044 Жыл бұрын
These 5minutes helped me more than my teacher to whom I paid in thousands! Thank you :)
@Codearchery
@Codearchery 7 жыл бұрын
In C++ , A Program can Run Successfully when int main() is left without a return value (return 0). Don't get confused :-) Newbie in Programming doesn't know this concept
@jaxonkane358
@jaxonkane358 3 жыл бұрын
InstaBlaster
@DilpreetSingh0
@DilpreetSingh0 Жыл бұрын
Very simple and to the point explanation. Good job 🫡
@jeel1721
@jeel1721 7 жыл бұрын
Without saying any single word you are teaching us very well👏
@Codearchery
@Codearchery 7 жыл бұрын
Thanks Jeel for watching my videos I hope you'll like to share my channel with your friends :-) Keep on watching Jeel
@thearpitkatiyar637
@thearpitkatiyar637 Жыл бұрын
continue making videos it will help a lot
@haseeburrehman6013
@haseeburrehman6013 4 жыл бұрын
Best teaching method ,i have specially login to my gmail to comment and like,and i am amazed why not people watch a briliant videos
@muhammadwaleed2406
@muhammadwaleed2406 Жыл бұрын
The most creative video I ever came across 🙏
@messiisthebest
@messiisthebest 3 жыл бұрын
Under-rated channel ,hope this channel gets a lot of recognization
@davlatbekkobiljonov911
@davlatbekkobiljonov911 Жыл бұрын
Thank you very much, explained very proffesionally and funny!
@yashrawat1232
@yashrawat1232 2 жыл бұрын
best video fully understand without voice
@sameersant2628
@sameersant2628 3 жыл бұрын
Really great explanation. Very easy to understand
@riyanplex5623
@riyanplex5623 Жыл бұрын
It is informative video
@cookwithflame7544
@cookwithflame7544 3 жыл бұрын
Amazing work 🥰....thaks a lot bcos it helped me a lot
@mechanicalbaba2484
@mechanicalbaba2484 3 жыл бұрын
Off course, this video deserves LIKE, great explanation
@popeye7336
@popeye7336 3 жыл бұрын
one of the coolest tutorial man.
@aliastar5616
@aliastar5616 2 жыл бұрын
Oh my God the man best explain ever ❤️💙💙😍😍🤩🤩
@bikdigdaddy
@bikdigdaddy 2 жыл бұрын
you did it so precisely and i cant thank enough for clearing my doubts. thanks a lot.
@Симона-ъ8и
@Симона-ъ8и 3 жыл бұрын
Thanks for the video! Nice and clear! Keep up the good work
@super4543
@super4543 6 жыл бұрын
I love this videos so much they make me understand C++ better!
@rohitghadge9173
@rohitghadge9173 6 жыл бұрын
Explanation method very nice.
@monikam245
@monikam245 4 жыл бұрын
This video helped Me a lot......thanks
@Impulse_Photography
@Impulse_Photography 3 жыл бұрын
Here's a question, and I hope I am not jumping ahead too far. If I have a class for parking spaces and need to count them each time a space is rented. This needs to be available to other functions in my class, and to the main(). Should this static variable 'count' be private in the class with other variables, or public so it can be accessed by anyone? Would I have to put it in the Global space so it is available outside the class ( to the function main() )?
@triptishrivastava166
@triptishrivastava166 6 жыл бұрын
Smoothly you explained the whole concept
@HggkJjhh
@HggkJjhh Жыл бұрын
that was amazing !!!! thank you so much
@Cedrek
@Cedrek 2 жыл бұрын
that was helpful , thank you
@venkatr2307
@venkatr2307 Жыл бұрын
Superb explaination..... please do videos for java also
@hairstylesbeauty6112
@hairstylesbeauty6112 6 жыл бұрын
Nice way to explaning...C++....👍👍
@Codearchery
@Codearchery 6 жыл бұрын
Have you seen Codearchery.com teaser? kzbin.info/www/bejne/maKvlZ94ltSbgrc Did you like it ?
@abufaya4155
@abufaya4155 6 жыл бұрын
I've never came across an explanation as good it is in ur vids!! But i have a doubt when u type cout
@sanyuktaagarwal5160
@sanyuktaagarwal5160 6 жыл бұрын
No, this is a syntax for Post fix i.e this syntax uses then changes the value. What output you expect is for ++Count;
@siddharthkshirsagar2545
@siddharthkshirsagar2545 7 жыл бұрын
keep it up best way of explaning
@Codearchery
@Codearchery 7 жыл бұрын
Thanks a lot Siddharth Kshirsagar. Keep on Commenting and Watching my videos. Plz Share this among your friends :-)
@aartijarial748
@aartijarial748 6 жыл бұрын
Awesome video sir your learning trick is very good ☺
@parismoschovitis4410
@parismoschovitis4410 6 жыл бұрын
Would the functionality of a static variable be the same of a global one? Could I use a global function as my counter?
@chandankumarsahu2048
@chandankumarsahu2048 5 жыл бұрын
Sir aap but ache se concept clear krwa the ho. Please c++ ke sare concept people video bnaye.
@dynishaabreu4544
@dynishaabreu4544 6 жыл бұрын
Nice awesome video 😋buh...in video for general variable after initialising count to 0, it increments to 1 and again becomes 0 after end of the block, y does that happen?😅
@abufaya4155
@abufaya4155 6 жыл бұрын
Dynisha Abreu i too hav that doubt!!
@manasvinsharma1740
@manasvinsharma1740 3 жыл бұрын
Where was this channel for so many years woowwwww
@salmasalah7940
@salmasalah7940 2 ай бұрын
Great job ❤❤
@hasikadilshani278
@hasikadilshani278 5 жыл бұрын
great video
@barnikroy3570
@barnikroy3570 3 жыл бұрын
Why do you have such low number of subscribers????.....you deserve to possess at least 1M.......
@lilshxv
@lilshxv 2 жыл бұрын
thank you so much.
@vrushalikulkarni8632
@vrushalikulkarni8632 6 жыл бұрын
Rude one... 😂😂 couldn't get better.. Good job dude
@faranahmadk7401
@faranahmadk7401 3 жыл бұрын
very well explained. concept
@tranthaptinh
@tranthaptinh 4 жыл бұрын
MAIN IDEAS OF STATIC OF C++ ? FOR ALL STUDENTS NOT ONLY FOR SMART STUDENTS ONLY ............. MAKE SURE EVERY STUDENTS UNDERSTAND IN THE CLASS ................. THE GOOD TEACHER IS THE ONE WHO DELIVER TO FIND THE BETTER WAY FOR ALL STUDENTS UNDERSTAND .............
@abood8945
@abood8945 4 жыл бұрын
YOU GOT TO HAVE A MILLION SUBs
@GGlearn
@GGlearn Жыл бұрын
general variable after end of programs does not change, it become zero after running :int counter=0;
@mohamedshehata8972
@mohamedshehata8972 2 жыл бұрын
nice video
@dipeshchandiramani1897
@dipeshchandiramani1897 4 жыл бұрын
Very good quality content! Thank You!!
@techtude
@techtude 6 жыл бұрын
Wow dude you are osm this is the best technique to delever your content like in the cartoon format that's why this is very impressive keep your work dude Even you inspired me now on I'm gonna make this type of graphics in my videos too U r osm dude I'm very thankful to you by the very bottom of my 💓 We love you.. always
@raihanhacks6726
@raihanhacks6726 3 жыл бұрын
thnks bro it is very help full to me . bro pls tell me is it like global variable in Python
@samiulislamdurjoy
@samiulislamdurjoy 4 жыл бұрын
00:01:35 cout
@saranyasambandham8478
@saranyasambandham8478 5 жыл бұрын
super explanation
@dracsoloment3970
@dracsoloment3970 4 жыл бұрын
could you say count = count++; to make the general variable actually incremement in main?
@saifislam8556
@saifislam8556 7 жыл бұрын
Just awesome, bravo
@Codearchery
@Codearchery 7 жыл бұрын
Thanks a lot saif I hope You'll like to Help this channel by sharing it with your friends Keep on watching and Keep on Learning Cool stuff :-)
@subhankhal8785
@subhankhal8785 5 жыл бұрын
super thanks alot
@Harrypotter-fl6je
@Harrypotter-fl6je 6 жыл бұрын
great video... Better to watch in 2x speed....
@mdsazidanirban8325
@mdsazidanirban8325 11 ай бұрын
thanks a ton
@ishwar1907
@ishwar1907 4 жыл бұрын
Thankyou thanku so much 😭😭
@soniyapol5755
@soniyapol5755 2 жыл бұрын
I cant get garbage value when i remove static it gives the same 0 1 2.....why so?
@tranthaptinh
@tranthaptinh 4 жыл бұрын
WHAT DO YOU MEAN BLOCK ? I BLOCK IS BELONG TO THE PROGRAM AND BLOCK IS ONE PART SMALLER THAN PROGRAM IF SO FIT WHERE IN THE PROGRAM ............. OR BLOCK IS OUTSIDE THE MAIN PROGRAM OR WHERE IS THE BLOCK ?
@جيمرمصري-ق5ق
@جيمرمصري-ق5ق 5 жыл бұрын
what will happen if we created that regular variable in the heap?
@hrithikmenon7042
@hrithikmenon7042 7 жыл бұрын
Helpful one!!
@Codearchery
@Codearchery 7 жыл бұрын
Thanks Hrithik for watching my videos Keep on watching and help me by sharing my channel As you can see I don't have much subscribers
@mrudulnagrale
@mrudulnagrale 5 жыл бұрын
Thanks
@atata0215
@atata0215 6 жыл бұрын
i use the compiler GCC 5.1.0, when i write : int x; cout
@hengborchhay6388
@hengborchhay6388 7 жыл бұрын
like it and love it !!! plz continues plz
@Codearchery
@Codearchery 7 жыл бұрын
Thanks heng for watching my videos. Yeah ! I will continue making more videos. If u want me to make a video on any topic just comment on any of my video :-) Keep on Learning :-)
@tranthaptinh
@tranthaptinh 4 жыл бұрын
THANK YOU CODEARCHERY ............. THANK YOU KZbin ....................................
@MemoirsOfADrainCleaner
@MemoirsOfADrainCleaner 5 жыл бұрын
I understand this concept, and I understand that with a static variable, but why exactly do we get 0 0 0 output
@christopherstromberg3070
@christopherstromberg3070 5 жыл бұрын
MR. LAYER it counts up to 1 at the end of the function, but when it returns to main that information gets tossed out. If you noticed it wasn’t even 0 until he set it to 0. It was just a bunch of random numbers. When it’s static that value is initialize to 0 and whatever is stored in the variable stays even after exiting the function. So each time the loop calls that function the value is incremented up when it’s static. When it’s a regular variable the value stored is reset every time the function returns to main.
@muhammadkhalil5070
@muhammadkhalil5070 6 жыл бұрын
THE BEST THING ON THE INTERNET MUCH APPRECIATION!
@sajalkarn7545
@sajalkarn7545 7 жыл бұрын
sir your video is best for it student point to point concept is cleared but sir we need more language like java ,data structure ,database so plzzz upload it as soon as possible
@Codearchery
@Codearchery 7 жыл бұрын
Hi sajal karn , thanks for Watching my videos and thanks for Commenting. I am going to upload videos on Data Structures soon. The Problem in uploading videos on lot of programming languages is time needed to make these videos. I have to spent 3 hrs for 5 min video , but I will try my best to upload as much videos as i can. Keep on learning and Please Share my videos so that they can help others too :-)
@sajalkarn7545
@sajalkarn7545 7 жыл бұрын
Learn Programming In Animated Way and I always obey
@Codearchery
@Codearchery 7 жыл бұрын
:-)
@zobiakhan3447
@zobiakhan3447 4 жыл бұрын
Thank you!!!!
@thaisimey896
@thaisimey896 6 жыл бұрын
Ur video so amazing!
@ranganakumar2129
@ranganakumar2129 4 жыл бұрын
i am not assigned any value to non-static variable,let it be assigned with some garbage value. while i am running the code getting out put in increment order as 0,1,2.
@bamsgian9759
@bamsgian9759 4 жыл бұрын
is data member and variable are actually same thing?
@g3stimulate485
@g3stimulate485 Жыл бұрын
how diifer static and global variable in c?
@NU_ASampathRajaRaghupathi
@NU_ASampathRajaRaghupathi 5 жыл бұрын
Sir iam Sampath. What is the use of static variable
@interestingupdates900
@interestingupdates900 7 жыл бұрын
what if static variable is used inside a class?do we need to intialize it to 0?
@Codearchery
@Codearchery 7 жыл бұрын
No even In class we don't need to initialize it to zero Watch My Video on Virtual Function , You will Understand it :-) As You can see My Subscribers are very less in spite of lot's of Good Work Plz help me in growing my channel Share My Channel on Social Media and with your Friends too :-) I hope you'll like to help this channel Keep on Watching and Keep on Learning
@interestingupdates900
@interestingupdates900 7 жыл бұрын
For sure bro....
@leifericson1658
@leifericson1658 2 жыл бұрын
Thanx
@andreiasimov33
@andreiasimov33 6 жыл бұрын
Perfect, thank you very much stranger! :)
@winhtut1187
@winhtut1187 6 жыл бұрын
u great sir
@satyamsolanki864
@satyamsolanki864 6 жыл бұрын
i need help in programming how we can communicate by other media
@prashantbhandari9499
@prashantbhandari9499 6 жыл бұрын
Best sir Keep it up
@Codearchery
@Codearchery 6 жыл бұрын
Thanks a lot prashant Have you seen Codearchery.com teaser? kzbin.info/www/bejne/maKvlZ94ltSbgrc Did you like it ?
@tranthaptinh
@tranthaptinh 4 жыл бұрын
WHAT'S THE DIFFERENCE BETWEEN BLOCK AND THE PROGRAM ..............
@arpitprajapati1933
@arpitprajapati1933 4 жыл бұрын
Please make videos on python
@kazimdanisurrahman6264
@kazimdanisurrahman6264 5 жыл бұрын
osthir✌✌✌
@satwikbhardwaj123
@satwikbhardwaj123 2 жыл бұрын
Ohhh bete ki jaaann!!
@chetanreddy106
@chetanreddy106 6 жыл бұрын
Omg really awesome
@Codearchery
@Codearchery 6 жыл бұрын
Thanks Chetan Have you seen Codearchery.com teaser? kzbin.info/www/bejne/maKvlZ94ltSbgrc Did you like it ?
@riyanplex5623
@riyanplex5623 Жыл бұрын
Why don't you do voice over it will become more perfect (anime+voice= highly understandable)
@xgamer-od7mb
@xgamer-od7mb 7 жыл бұрын
keep up the great work!!!
@Codearchery
@Codearchery 7 жыл бұрын
Hey Thanks a lot friend :-) for watching my video and for this comment :-) I like your Username "Hello World " Keep on Learning and Keep on Watching
@CodingMEasy
@CodingMEasy 7 ай бұрын
why did u stop making videos😢
@vivekdevkar4941
@vivekdevkar4941 5 жыл бұрын
How to define a static variable in a class?
@anitadevdare6813
@anitadevdare6813 5 жыл бұрын
for normal datatype it shows same result 0 1 2
@anitadevdare6813
@anitadevdare6813 5 жыл бұрын
how.....?
@speconcloud9
@speconcloud9 4 жыл бұрын
was a good video but watching this i felt like a nursery class child XD
@tranthaptinh
@tranthaptinh 4 жыл бұрын
DON'T FORGET YOU HAVE TO WRITE WHAT'S STATIC MEANS IN C++ WHAT'S FUNCTION OR ACTION OR IS IT THE NAME OF CLASS OR SOMETHING AS YOU GIVE OUT DEFINITION OF STATIC FIRST ?
@iffatsoumee2991
@iffatsoumee2991 4 жыл бұрын
Why man why?? U r soooooo much cute. All these above is extraordinary. Anyway take LUV
@black.clover.11
@black.clover.11 2 жыл бұрын
ooooooooopppp
@surajnair1093
@surajnair1093 7 жыл бұрын
nice one. may you grow. Just improve the grammar :D
@BangMaster96
@BangMaster96 7 жыл бұрын
shut up about grammar dude it takes a lot of hard work to make these videos and you still complain typical indian behavior
@maniacarts9213
@maniacarts9213 6 жыл бұрын
@Sunny shah damn you are triggered really easily xD let him critic my friend.....it just helps improving ^^(as long as he doesn't get rude^^
@alexsage4067
@alexsage4067 4 жыл бұрын
what is the point of a video if I have to read everything
STATIC FUNCTIONS IN C++ - 25
5:04
Codearchery
Рет қаралды 47 М.
Abstract Class and Pure Virtual function in  C++ -51
11:03
Codearchery
Рет қаралды 98 М.
когда не обедаешь в школе // EVA mash
00:51
EVA mash
Рет қаралды 4,3 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 964 М.
Я сделала самое маленькое в мире мороженое!
00:43
Кушать Хочу
Рет қаралды 3,7 МЛН
you will never ask about pointers again after watching this video
8:03
COPY CONSTRUCTOR IN C++ ( 33)
5:07
Codearchery
Рет қаралды 78 М.
What is a static variable?
4:45
CodeVault
Рет қаралды 40 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 540 М.
Static Data Member And Static Member Function In C++
17:19
CppNuts
Рет қаралды 52 М.
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,7 МЛН
how Google writes gorgeous C++
7:40
Low Level
Рет қаралды 905 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2,2 МЛН
когда не обедаешь в школе // EVA mash
00:51
EVA mash
Рет қаралды 4,3 МЛН