TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Sunday 30 August 2020

Operator Overloading Comma In C++ | Example Of Operator Overloading Comma In C++| Operator Overloading Comma In C++ In Hindi

 

Operator Overloading Comma In C++

In C++, the operator access to a member of an object -> can be overloaded. If the operator -> is overloaded, the call of the class.


image of Operator Overloading Comma In C++

Fig:Operator Overloading Comma In C++


Program:

#include <iostream>

class Double

{

public:

    double d;

   

    Double* operator->()

    {

        return this;    }

};

void main()

{

        Double D;

    double x;

    D.d = 3.85;

    x = D->d;

    x = D.d;

    cout << "x = " << x;

}

 

Output:

x-3.85

No comments:

Post a Comment