Arrow operator in c

In C++, we can make operators to work for user defined classes. This means C++ has the ability to provide the operators with a special meaning for a data type, this ability is known as operator overloading. For example, we can overload an operator ‘+’ in a class like String so that we can concatenate two strings by just using +. C++ left arrow operator. Posted on July 29, 2016 Sometimes you have a pointer to a class, and you want to invoke a method. You can use the -> operator for that. In the early version of C++ would let ‘this’ pointer to be changed; by doing so a programmer could change which object a method was working on. This feature was eventually removed, and now this in C++ is an r-value. The result of the .* or ->* pointer-to-member operators is an object or function of the type specified in the declaration of the pointer to member. So, in the preceding example, the result of the expression ADerived.*pmfnFunc1() is a pointer to a function that returns void. This result is an l-value if the second operand is an l-value. A class member or structure member in C++ can be almost any data type (e.g., int, char, double, an array, an object of some type you’ve defined, a pointer to any of these things, etc.). May 29, 2017 · RECOMMENDED BOOKS TO STUDY C++ +++++ BEGINNERS BOOKS FOR C++ (No previous programming experience required):