Search
 
SCRIPT & CODE EXAMPLE
 

C

*= operator

“*=”: This operator is a combination of ‘*’ and ‘=’ operators. This operator 
first multiplies the current value of the variable on left to the value on the
right and then assigns the result to the variable on the left. 
(a *= b) can be written as (a = a * b)

If initially, the value stored in a is 5. Then (a *= 6) = 30.
Comment

->* operator

//we have a class
struct X
{
   void f() {}
   void g() {}
};

typedef void (X::*pointer)();
//ok, let's take a pointer and assign f to it.
pointer somePointer = &X::f;
//now I want to call somePointer. But for that, I need an object
X x;
//now I call the member function on x like this
(x.*somePointer)(); //will call x.f()
//now, suppose x is not an object but a pointer to object
X* px = new X;
//I want to call the memfun pointer on px. I use ->*
(px ->* somePointer)(); //will call px->f();
Comment

*= operator

“*=”: This operator is a combination of ‘*’ and ‘=’ operators. This operator 
first multiplies the current value of the variable on left to the value on the
right and then assigns the result to the variable on the left. 
(a *= b) can be written as (a = a * b)

If initially, the value stored in a is 5. Then (a *= 6) = 30.
Comment

->* operator

//we have a class
struct X
{
   void f() {}
   void g() {}
};

typedef void (X::*pointer)();
//ok, let's take a pointer and assign f to it.
pointer somePointer = &X::f;
//now I want to call somePointer. But for that, I need an object
X x;
//now I call the member function on x like this
(x.*somePointer)(); //will call x.f()
//now, suppose x is not an object but a pointer to object
X* px = new X;
//I want to call the memfun pointer on px. I use ->*
(px ->* somePointer)(); //will call px->f();
Comment

PREVIOUS NEXT
Code Example
C :: ubuntu ocaml install 
C :: c convert float to int 
C :: ecto where is not nil 
C :: marquee html code with right 
C :: ansi c read write bmp 
C :: c atoi atof 
C :: XAudio2 C 
C :: Command to compile and execute a c file program consecutively 
C :: Highest integer among the four inputs in c 
C :: como somar em C 
C :: convert c code to python online free 
C :: Fibonacci program c pthread 
C :: Combine two sentences into one langage c 
C :: epita 
C :: until command lldb 
C :: perl file handling 
C :: Handling exceptions during datetime conversion 
C :: Entering raw mode 
C :: assembly to c code converter 
C :: passing an array to a function 
C :: sue murry 
C :: escaping characters in hibernate queries 
C :: putting character in the begginig and end of sring C 
C :: c static variable 
C :: change variable type in c 
C :: how to write a hello world program in c 
C :: filing in c 
Dart :: navigator.pushandremoveuntil flutter 
Dart :: flutter rounded ElevatedButton 
Dart :: height appbar flutter 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =