Is there any reason to use C instead of C++ for embedded development?

后端 未结 30 3646
既然无缘
既然无缘 2020-11-30 17:20

Question

I have two compilers on my hardware C++ and C89

I\'m thinking about using C++ with classes but without polymorphism (to avoid vtables). The main r

30条回答
  •  温柔的废话
    2020-11-30 17:50

    C wins on portability - because it is less ambiguous in language spec; therefore offering much better portability and flexibility across different compilers etc (less headaches).

    If you aren't going to leverage C++ features to meet a need then go with C.

提交回复
热议问题