Is it bad practice to use a C header instead of its C++ equivalent in C++ (e.g. stdio.h instead of cstdio)?

前端 未结 4 1143
北海茫月
北海茫月 2021-01-14 04:22

It seems that a lot of people include example.h instead of cexample in their C++ code. I know that everything in the C++ versions is declared in namespace std, but I\'m not

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 05:08

    It's OK. But it somehow seems neater to to use the C++ style (i.e. no .h extension) in C++ code. I wouldn't (and I don't) worry about it.

提交回复
热议问题