enigma-dev / enigma-dev/enigma-dev
Weridness when using += or ++ with uninitialized variables
Open
Unconfirmed
- Dominant language
- C++
- Stars
- 379
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
When dealing with a previously uninitialized variables, the follow **does not work** properly:
_variable += 1_
This also **does not work** properly:
_variable++_
But the following **does work**:
_variable = variable + 1_
And this also **works**:
_variable = 0_ (somewhere during a creation step, not here right before the incrementing as that would "work" but lock it at 1 obviously)
_variable += 1_
Why or how I don't know, I was just trying to get someone elses simple old project to work properly and this change got a lot of stuff working in it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.