gpt4 book ai didi

c++ - 什么是 C++ 中的
转载 作者:IT老高 更新时间:2023-10-28 21:41:13 26 4
gpt4 key购买 nike

Possible Duplicate:
C extension: <? and >? operators

看看这个Google Code Jam的问题D的最佳答案(sclo) .是C++代码,一定是编译过的,里面有这样的语句:

double& ret = F[mask][cur][b];
if(j==cur) {
ret<?=f(tmp,j,b||bad[i])+M[cur][i]; // WTF is <?= ???
}

这在我的 Visual Studio 2008 中无法编译。<?= 是什么意思?什么意思?

最佳答案

这是一个 gcc 扩展:C extension: <? and >? operators

Recent manuals say:

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...

关于c++ - 什么是 C++ 中的 <?=?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4734396/

26 4 0

Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com