stdio.h not standard in C++?

前端 未结 4 544
感情败类
感情败类 2020-11-29 08:41

I know most compilers allow both:

#include 

//and

#include 

But someone argu

4条回答
  •  心在旅途
    2020-11-29 09:18

    The C standard headers are included in the C++ standard library for compatibility.

    The difference is that identifiers in corresponding C++ headers must (also) be in std namespace, whereas identifiers in C headers must (also) be available in global namespace.

    In addition, the headers add overloads for functions like abs, pow etc.

    Also, C++ headers replace some C classification/comparison macros with overloaded functions.

提交回复
热议问题