Is there a performance difference between i++ and ++i in C++?

前端 未结 17 2069
臣服心动
臣服心动 2020-11-21 17:15

We have the question is there a performance difference between i++ and ++i in C?

What\'s the answer for C++?

17条回答
  •  失恋的感觉
    2020-11-21 17:54

    An the reason why you ought to use ++i even on built-in types where there's no performance advantage is to create a good habit for yourself.

提交回复
热议问题