什么是<?=在C ++? [英] What is <?= in C++?
问题描述
可能重复:
C extension:<?和>?运算符
查看顶部答案的此 Google代码Jam 。它是C ++代码,它必须已经编译,它包含如下的语句:
Take a look at the top answer (by sclo) to problem D of this Google Code Jam. It's C++ code, it must have compiled, and it contains statements such as this one:
double& ret = F[mask][cur][b];
if(j==cur) {
ret<?=f(tmp,j,b||bad[i])+M[cur][i]; // WTF is <?= ???
}
这不会在Visual Studio 2008中编译。<?=
是什么意思?
This doesn't compile in my Visual Studio 2008. What does the <?=
mean?
推荐答案
这是一个gcc扩展: C扩展名:< ;?和>?运算符
It's a gcc extension: C extension: <? and >? operators
最近的手册说:
G ++最小和最大运算符('
<?
'和'>?
') ><?= ')和'>?=
')已被弃用,现在从G ++中删除。应该修改使用这些运算符的代码以使用std :: min
和std :: max
p>
The G++ minimum and maximum operators (‘
<?
’ and ‘>?
’) and their compound forms (‘<?=
’) and ‘>?=
’) have been deprecated and are now removed from G++. Code using these operators should be modified to usestd::min
andstd::max
instead...
这篇关于什么是<?=在C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!