Why is getcwd() not ISO C++ compliant?

前端 未结 7 843
时光取名叫无心
时光取名叫无心 2020-12-09 09:55

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

7条回答
  •  生来不讨喜
    2020-12-09 10:33

    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.

提交回复
热议问题