为什么getcwd()不符合ISO C ++标准? [英] Why is getcwd() not ISO C++ compliant?

查看:157
本文介绍了为什么getcwd()不符合ISO C ++标准?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此MSDN文章声明getcwd()已被弃用,并且ISO C ++兼容

This MSDN article states that getcwd() has been deprecated and that the ISO C++ compatible _getcwd should be used instead, which raises the question: what makes getcwd() not ISO-compliant?

推荐答案

没有指定函数的方法是什么使得getcwd标准应该以下划线作为前缀,以表明它们是供应商特定的扩展或遵守非ISO标准。因此,这里的合规性是为微软添加一个下划线到这个特定的函数的名称,因为它不是ISO标准的一部分。

Functions not specified in the standard are supposed to be prefixed by an underscore as an indication that they're vendor-specific extensions or adhere to a non-ISO standard. Thus the "compliance" here was for Microsoft to add an underscore to the name of this specific function since it's not part of the ISO standard.

这篇关于为什么getcwd()不符合ISO C ++标准?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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