Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does "a<?=b" in C++ mean? [duplicate]

Tags:

c++

syntax

I saw this code

a<?=b; // (a and b are int)

from the solution of Google Code Jam.

but my VS shows an error on '?'

I only know the following:

a>b?a=0:b=0;

Thanks.

like image 380
czhao86 Avatar asked Dec 20 '22 17:12

czhao86


1 Answers

Old operator; it's a (since removed) gcc extension for 'minimum'. That is:

a <?= b;

is the same as:

a = a < b ? a : b;
like image 65
Carl Norum Avatar answered Dec 22 '22 06:12

Carl Norum