Quantcast
Channel: programmingtipoftheday
Viewing all articles
Browse latest Browse all 10

The C/C++ ‘goes to’ operator

$
0
0

Did you know there is an operator in c++ called ‘goes to’ ? it looks like this ‘–>’


int x = 10;
while(x --> 0) {
  cout << "x is " << x << endl;
}

try it out!

Maybe for my next interview I give, I’ll ask a C++ candidate how this operator works.



Viewing all articles
Browse latest Browse all 10

Trending Articles