What's the difference between explicit and implicit assignment in C++

前端 未结 3 1400
[愿得一人]
[愿得一人] 2020-12-16 14:04
int value = 5; // this type of assignment is called an explicit assignment
int value(5); // this type of assignment is called an implicit assignment
<
3条回答
  •  既然无缘
    2020-12-16 14:11

    Only the first one is an assignment. They are both initialization.

    Edit: actually, I'm wrong. Neither are assignment.

提交回复
热议问题