I am learning C ++ and I have seen that all of the following examples initialize an int for a given value:
int i = 0;
int j = int(0);
int k{ 0 };
I read other questions like int a = 0 and int a (0) differences [duplicate]
The only questions (and answers) that I found only:
- Follow the first two examples.
- Mention that for "int" they can be the same, but for other types it may not be the same (without indicating how and why).
I would like to further understand the difference between them and how they may differ in other cases.
source
share