0

Variable initialization in c++

I know that in C you need to initialize while declearing. Does it also apply to c++?

1st Oct 2020, 4:11 PM
‫רון סיידר‬‎
‫רון סיידר‬‎ - avatar
1 Odpowiedź
+ 1
No. You don't need to. You only initialize a variable if the next immediate action you take on that variable is reading the value it contains.
1st Oct 2020, 4:44 PM
Anthony Maina
Anthony Maina - avatar