什么是ANSI-C ++

什么是ANSI-C ++?
ANSI-C++ is the name by which the international ANSI/ISO standard for the C++ language is known. But before this standard was published, C++ was already widely used and therefore there is a lot of code out there written in pre-standard C++. Referring to ANSI-C++ explicitly differenciates it from pre-standard C++ code, which is incompatible in some ways.
ANSI-C ++是C ++语言的国际ANSI / ISO标准已知的名称。但是,在这个标准发布之前,C ++已经被广泛使用,因此在标准C ++中编写了很多代码。引用ANSI-C ++明确地将它与预标准的C ++代码区分开来,这在某些方面是不兼容的。

#include <iostream>
using namespace std;
template <class T>
bool ansisupported (T x) { return true; }

int main() {
  if (ansisupported(0)) cout << "ANSI OK";
  return 0;
}

If your compiler is able to compile this program, you will be able to compile most of the existing ANSI-C++ code.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值