I saw someone say in a comment that initializing variables with ' {} ' is better than with ' = ' . Is this true ? if it is explain why please.
Asked
Active
Viewed 40 times
0
-
Welcome to StackOverflow! You will find help here, but only for questions that are answerable according to SO rules. SO is not a forum, but is a Q&A site. That means that we expect precise questions for which a precise answer is possible. As a new user, you really should read [ask]. I am sorry, but without more context (references of the comment, or examples) this question will be hard to answer. – Serge Ballesta Nov 05 '21 at 15:18
-
Maybe this helps: https://stackoverflow.com/questions/59405190/difference-between-and-syntaxes-for-initializing-a-variable-in-c – Jabberwocky Nov 05 '21 at 15:18
-
@SergeBallesta yes that's what i'm looking for thank you. should i leave this post or delete it ? – Ken Za Nov 05 '21 at 15:21
-
@KenZa: It is up to you. I have just marked it as a duplicate to prevent others to try to answer. – Serge Ballesta Nov 05 '21 at 15:27