STATIC FUNCTIONS IN C++ - 25
Vložit
- čas přidán 6. 02. 2017
- STATIC FUNCTIONS
In this video we will learn everything about Static Function .
How to define and declare static function in Class.
All properties of Static Function and How to call a Static
Function in main function.
Enjoy Learning.
Mail: Aniproguy@gmail.com
Music:THE HAPPY SONG by Nicolai Heidlas Music / nicolai-heidlas
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons.org/licenses/b...
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++- 32 :- • Constructor Overloadin...
Told the lab assistant to explain me what's the deal with static functions.
She said "they are important". :/
Watched the video, told the lab assistant I understood why in 10 minutes, rather than 2 stupid hours of doing nothing
Thaaanks
Thanks for such a Wonderful Comment Alexandra.
Share my channel with your lab assistant :-P
Thanks for Watching
lolx i dont even ask my teachers coz of these great youtube channels
Why static function can only access static variables?
Answer: Because the static function doesn't have a class instance so we can't reference non-static variables.
Maybe help someone.
I love this. At first, I feel that I was being talked down on like a 5-year-old on how to understand C++. Then again, anything to help understand C++ as a 5-year-old is a boon. Thank you again!
Amazing Content!!
It took just 2-3 minutes to understand it, I am sure i wil remember this very easily.
Thank you codearchery!
Very Well said! u said it in 10min which our teacher couldn't tell in 40min.
Thanks Mallikarjun :-)
And don't forget to share this video with your Classmates.
hey,your video is so good to learn the difficult concepts easily and even i just loved your way of teaching things ,...mostly the animation
this video is very concise, straight hit to point. Ended with a cat is lovely idea!
very nice videos . they increased my coding knowledge
Thanks for the great videos!!
Thank you...the "way of explanation" is much easier to understand the concept with no confusion...
Thanks nikhi , Keep on Watching and Keep on Learning
Oh thank you for this simple ,clear explanation
czcams.com/channels/VoUouiJy2NJebt8uJX5xhw.html
👆 Check this link it may help you for c++ programming
point to be noted..
00:01:10 this statement must be written
00:01:47 memorize bullets point
00:03:43 rule of calling static function is different
Fantastic explanation thanks man.
Your videos are fantastic bro...
Thank you so much...... I just love your way of teaching.....💕😊👌🏼
Have you seen Codearchery.com teaser?
czcams.com/video/cqLdlBaohLU/video.html
Did you like it ?
Hey. This tutorial was really helpful. Thanks for creating it. But i hv one question. I wrote this exact same code in my DEV C++ complier and called the static function by the object of the class and it generated the same output as generated by the function called by class name. Hope you'll answer this. Love.
you are just awesome bro
i am learning by watching your videos
Thanks Muhammad , Keep on Learning. My videos are becoming better and better , and I hope you'll love to keep on learning through my videos. Share these with others too Muhammad :-)
thanks dude
Thank u so much (y)
I understood this concept, but where we should use static member functions what is the use and tell some real time example also
i like this way how you explain
great man
note: satic variable value need notn be inniatialised .by default it is zero unlike a normal variables containing garbage valuse in case not value-initialised .
note:you have to call static function by using class name followed by scope resolution
Thank you very much!
I am happy that you like it Dung Tri :-)
Keep on Watching , My Channel got lot of Good Stuff
I hope you would like to help me by Sharing My Channel with your Friends
Hey bro can you please explain t me what is strcpy? I've searched the net for simple explanation but all I find i complex definitions with technical terminologies which i don't understand..
To make video on constant member function please
Tqsm 👏👏👏
What is need using static members and functions in the program?
thank you so much
Thanks Yorikotah for watching my videos and for Subscribing
Sorry for my late reply
Don't forget to help this channel by sharing it with your friends
Keep on watching and Keep on Learning Cool stuff :-)
cant we use obj1.showcounter to call the function??????:)))
If I am declaring a static function, then is it not necessary to tel to compiler that it is a static function just like we telling about
static variable?
Ashish Rawat yes, you are right. Because Static data member should have to be initialized as it is declared but due to declaring it inside the class we cannot initialize it there, so we initialize it outside the class but a static function doesn't have to be declared separately.
You can watch my video on Static Member Function.
Link: czcams.com/video/9Fp91lFA6XE/video.html
Hi team please make lectures on c++11 concepts
And on design patterns also
Void increment ( ) is not a static function then how can it increment the value of static variable counter
We didn't initialised the counter variable, how is it initialised by 0.
Also if there will be two variables/objects of that class demo then will the static variable will be same for both objects?
counter is a static variable so by default its value is initialised 0
@@anishmanandhar1203 ok thanks...if you can clarify on the second part of the question it would be helpful again..
@@yogkumar4726 That was indeed a good question, firstly the static variable are meant to be used without creating the object, but even if you want to create the object that's fine. So if you create the two objects of the same class the static variable's property is shared meaning the scope of the variable persists throughout the program
@@anishmanandhar1203 so that means the value of static variable will remain same for every object ie if it is changed for one object then it will be changed for the other object also, right?
what will happen if there was two object in above same program. And I want to call the showcounter function for any one object then in that case how compiler will deal with that situation.
compiler will take only that object
Great !!
But as always have a doubt
U SAOD THAT
Only static function can access static data members but how can
Non-static member function can access and increment the value of a static data member in class;
Plzz clarify me....
Static function can only access static members.
Non-static function can access both static and non-static members.
great
Hey jack , thanks for this comment.
By the way I like your name Jack Sparrow :-)
U r wowsome.......
Please don't add this type of music..It is breaking our concentration.
THIS IS WAY TOO FAST. COME ON NOW. WE CAN BARELY READ THE PROGRAMS BEFORE YOU MOVE ON TO ANOTHER THING.
This one is the worst video in my life 😡😡