26 26 operator

Solutions on MaxInterview for 26 26 operator by the best coders in the world

showing results for - " 26 26 operator"
Axel
12 Jan 2019
1let tiktoker = "faisu"
2
3// && opeator 
4if(tiktoker == "faisu")
5{
6  console.log("6")
7}
8
9// Instead use && 
10tiktoker=="faisu" && console.log(6)
11
12// || opeator
13if(tiktoker != "ccc")
14{
15  console.log("clean")
16}
17
18// Instead use ||
19tiktoker =="xx" || console.log("clean")
Ilaria
22 Jun 2018
1//we have a class
2struct X
3{
4   void f() {}
5   void g() {}
6};
7
8typedef void (X::*pointer)();
9//ok, let's take a pointer and assign f to it.
10pointer somePointer = &X::f;
11//now I want to call somePointer. But for that, I need an object
12X x;
13//now I call the member function on x like this
14(x.*somePointer)(); //will call x.f()
15//now, suppose x is not an object but a pointer to object
16X* px = new X;
17//I want to call the memfun pointer on px. I use ->*
18(px ->* somePointer)(); //will call px->f();