什么是<?=在C ++? [英] What is <?= in C++?

查看:256
本文介绍了什么是<?=在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 use std::min and std::max instead...


这篇关于什么是&lt;?=在C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆