@Mark ok so you don't call the second statment assignment?
assignment involves a destructor I understand
user2334
@sabgenton Depends on the language and who you're talking to, but I wouldn't call it an assignment because a hasn't been initialized yet. Assignment requires destroying the old value and replacing it with a new one
user2334
Some people define initialization as the first assignment though
@MarkTrapp I thought it would be destroying an old value
say garbage
if it was in a function
(c/c++)
user2334
8:11 AM
In C/C++, as far as I understand both, assignment and initialization are two different things and that would definitely not be an assignment. In GC languages like Java or PHP or whatever, there's very little difference between the two.
@sabgenton Actually, looking around to confirm what I've been telling you, I don't know what I'm talking about. You might want to ask real experts who do instead, like in the C++ room.
What EXACTLY is the difference between INITIALIZATION and ASSIGNMENT ?
PS : If possible please give examples in C and C++ , specifically .
Actually , I was confused by these statements ...
C++ provides another way of initializing member variables that allows us to initialize member variabl...