Static Member Functions | C++ Tutorial | Mr. Kishore

Sdílet
Vložit
  • čas přidán 17. 04. 2017
  • C ++ Tutorial Videos | Mr. Kishore
    ** For Online Training Registration: goo.gl/r6kJbB ► Call: +91-8179191999
    💡 Also Watch
    C Language Tutorials: goo.gl/qDhJ2r
    Core Java FAQ's: goo.gl/qGh5mA
    Core Java Tutorials: goo.gl/NbaEge
    Java Programming Tutorials by Mr.Hari krishna:
    goo.gl/HThq6H
    Advanced Java Programming Tutorials by Mr.Nataraj:
    goo.gl/1U2Qgy
    Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.
    💡 Visit Our Websites
    For Classroom Training: nareshit.in/cpp-training/
    For Online Training: nareshit.com/c-online-training/
    #JavaCollectionsFramework #Tutorials #Videos #corejava #Quiz #Clanguage
    --------------------------
    💡 About NareshIT:
    "Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA , Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA, Hyderabad, Chennai and Vijayawada, Bangalore India which provides online training across all the locations
    --------------------------
    💡 Our Online Training Features:
    🎈 Training with Real-Time Experts
    🎈 Industry Specific Scenario’s
    🎈 Flexible Timings
    🎈 Soft Copy of Material
    🎈 Share Videos of each and every session.
    --------------------------
    💡 Please write back to us at
    📧 us.training@nareshit.com/ 📧 online@nareshit.com or Call us at the USA: ☎+1404-232-9879 or India: ☎ +918179191999
    --------------------------
    💡 Check The Below Links
    ► For Course Reg: goo.gl/r6kJbB
    ► Subscribe to Our Channel: goo.gl/q9ozyG
    ► Circle us on G+: plus.google.com/+NareshIT
    ► Like us on Facebook: / nareshit
    ► Follow us on Twitter: / nareshitek
    ► Follow us on Linkedin: goo.gl/CRBZ5F
    ► Follow us on Instagram: goo.gl/3UXYK3

Komentáře • 51

  • @NareshIT
    @NareshIT  Před 5 lety +4

    Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL

  • @danishzia3511
    @danishzia3511 Před 4 lety +16

    What can I say? I wish I had known you in 2017! No one has explained C++ in such details as you did. Wish you a world for the job you do..

  • @58__tannurawat95
    @58__tannurawat95 Před 3 lety +7

    I rarely comment for CZcamsrs but sir you are outstanding amazing fabulous you deserve the respect ,from us

    • @molyoxide8358
      @molyoxide8358 Před 3 lety +1

      may I know whether are you in college or school??

    • @yogeshupadhyay7975
      @yogeshupadhyay7975 Před 3 lety +1

      @@molyoxide8358 hrrr jagah Panchayati krni hai Londo ko....

  • @dr.r.suganthi2304
    @dr.r.suganthi2304 Před 5 lety

    Super sir... tomorrow need to take lesson of static.. valuable and timely help

  • @anayapathak7162
    @anayapathak7162 Před 3 lety

    These faculties are so down to earth. Look how humbly they speak.

  • @niteshpaudelofficial
    @niteshpaudelofficial Před rokem

    best c++ teacher I have seen on youtube

  • @pe_P
    @pe_P Před 3 lety +1

    Well explained..😇Thankyou sir♥️

  • @rahulchaubey8988
    @rahulchaubey8988 Před 4 lety

    you teach like a pro teacher...

  • @techdyan8500
    @techdyan8500 Před 3 lety

    Thank you for clearing doubt sir.

  • @mohammednazreen4882
    @mohammednazreen4882 Před 2 lety

    Outstanding explanation sir

  • @KizunaK15
    @KizunaK15 Před 8 měsíci

    terimakasih pakde Kishore 🙏🏻

  • @ravisinghrawat5644
    @ravisinghrawat5644 Před 4 lety

    Thanks a lot ...........

  • @mitrachalaune8449
    @mitrachalaune8449 Před 6 lety +1

    Thank ou sir

  • @sammedsankonatti1579
    @sammedsankonatti1579 Před 3 lety

    Whether we need to define static member functions outside the class , in the same way that we define static data members

  • @tarushidubey6108
    @tarushidubey6108 Před rokem

    Thank you sir🙏

  • @sharath5796
    @sharath5796 Před 3 lety +1

    in first example..x and y are not defined ...they are directly passed as parrameter

  • @geetaranidehuri3459
    @geetaranidehuri3459 Před 2 lety

    Thank u sir

  • @niroshathanaya7858
    @niroshathanaya7858 Před 4 lety

    Sir tq meru chepthunadhi maku bhaga ardham indhi but konchem program tho explain chesthy bhaguntundhi sir

  • @ajaykharat8689
    @ajaykharat8689 Před 6 lety +2

    class ajay
    {
    private:
    int a,b;

    public:
    int c,d;
    static int e;
    };
    int ajay::e;
    int main()
    {
    ajay a1;
    //ajay::c; //ERROR-->invalid use of non-static data member 'ajay::c'
    ajay::e; //Valid
    }

    • @techcoding0543
      @techcoding0543 Před 3 lety +2

      as c is not a static member so it gives error
      so to access c varible .so a1.c should be used
      i think so

  • @gopialavala8618
    @gopialavala8618 Před rokem

    sir in the main part we have to write the data type na sir first and after that we can write class name but you wrote cls name first why sir

  • @IshaqKhan-rk5bl
    @IshaqKhan-rk5bl Před 6 lety +6

    if we havent declared x and y as static how do function know they are static?

    • @osamaa1891
      @osamaa1891 Před 6 lety +3

      Here x and y are not data members.They are actually local variable.
      SO they can't be static or non-static:D

    • @tharunkumarreddyk7581
      @tharunkumarreddyk7581 Před 3 lety

      @@osamaa1891 static member functions only work with static data members

    • @vikramkumar9008
      @vikramkumar9008 Před 3 lety +1

      Can static data member work in private section also

    • @sharath5796
      @sharath5796 Před 3 lety

      @@osamaa1891 in firstv example they are bot declared

    • @garimajain4218
      @garimajain4218 Před 2 lety

      @@sharath5796 i also confused at this point

  • @jitendramehta1550
    @jitendramehta1550 Před 5 lety

    Thanks a lot sir ji

  • @ajmalbangash6928
    @ajmalbangash6928 Před 4 lety

    In the first program u have static mem function but did not have static data members, so then how it is working???

    • @molyoxide8358
      @molyoxide8358 Před 3 lety +1

      they were local variable for the static function. so there's no need to declare it as a static or non-static.

  • @vikramkumar9008
    @vikramkumar9008 Před 3 lety

    Sir in previous lecture you says static data member are declare inside public section

  • @arjumandayoub8483
    @arjumandayoub8483 Před rokem

    #include
    using namespace std;
    class sample {
    public:
    static void input (int x, int y) { // now even tho maine static data members pehle declare nahi kiye hai this will still work.
    cout

  • @kanhuhembram3565
    @kanhuhembram3565 Před 5 lety +1

    I think after making data members static also give error bcoz they are declared under private section

    • @amandeepbhullar1860
      @amandeepbhullar1860 Před 5 lety

      And they are acessed by the member function of that class so i think there is no error

    • @whoisnegii
      @whoisnegii Před 5 lety

      @@amandeepbhullar1860 if you want to access them through class name in main fun then they must be in public section

    • @006daredevil
      @006daredevil Před 4 lety +1

      Karan Negi No member functions and data members which is declared in same class and if Data members are declared as private then still Member functions can acess that private variable because they are declared inside the same class. Another way to acess a private data member is using friend functions.

  • @ajaykharat8689
    @ajaykharat8689 Před 6 lety +5

    #include
    #include
    #include
    using namespace std;
    class ajay
    {
    private:
    int a,b;

    public:
    static void getdata() //Only static data member is allowed in static member function
    {
    a=10; //ERROR-->invalid use of member 'ajay::a' in static member function
    b=20; / /ERROR-->invalid use of member 'ajay::b' in static member function
    cout

  • @chandumadhumanthi9983
    @chandumadhumanthi9983 Před 4 lety +2

    U r saying that Static data members can be accessed with class but for class memory will not be created bcoz it is logically exists but not physically until n unless object created for that class memory won't be created

    • @venkatp9381
      @venkatp9381 Před 4 lety

      All static members are created during program start and will remain till program end. So these static members are not part of class memory

    • @molyoxide8358
      @molyoxide8358 Před 3 lety

      Do you want answer for this question??

  • @ajaykharat8689
    @ajaykharat8689 Před 6 lety

    #include
    #include
    #include
    using namespace std;
    class ajay
    {
    private:
    int a,b;

    public:
    void getdata()
    {
    a=10;
    b=20;
    cout

  • @ajaykharat8689
    @ajaykharat8689 Před 6 lety +1

    #include
    #include
    #include
    using namespace std;
    class ajay
    {
    private:
    static int a,b;

    public:
    static void getdata()
    {
    this->a=10; //ERROR-->'this' is unavailable for static member functions
    this->b=20; ////ERROR-->'this' is unavailable for static member functions
    cout

  • @user-sr4ul5xx3o
    @user-sr4ul5xx3o Před 4 lety

    Try to improve the teaching language in tamil