I am learning C++, and I've seen that all of the following examples initialize an int to a given value:
int i = 0;
int j = int(0);
int k{ 0 };
I read other questions such as int a = 0 and int a(0) differences [duplicate]
The only questions (and answers) I've found only:
- Deal with the first 2 examples.
- Mention that for "int" these may be the same, but for other types it may not be the same (without specifying how or why).
I'd like to further understand the difference between these, and how may they differ in other cases.