###Bug: uninitialized variables###
Bug: uninitialized variables
You didn't initialize sharp
and flat
to false
, so they could randomly be true
even when the note string doesn't contain any sharp or flat symbols. You should make a habit of initializing all your local variables to avoid these kinds of problems. Also, some compilers will warn you about uninitialized variables if you turn on full warnings, so you should look into how to do that for the compiler you are using.
###Bug: uninitialized variables###
You didn't initialize sharp
and flat
to false
, so they could randomly be true
even when the note string doesn't contain any sharp or flat symbols. You should make a habit of initializing all your local variables to avoid these kinds of problems. Also, some compilers will warn you about uninitialized variables if you turn on full warnings, so you should look into how to do that for the compiler you are using.
Bug: uninitialized variables
You didn't initialize sharp
and flat
to false
, so they could randomly be true
even when the note string doesn't contain any sharp or flat symbols. You should make a habit of initializing all your local variables to avoid these kinds of problems. Also, some compilers will warn you about uninitialized variables if you turn on full warnings, so you should look into how to do that for the compiler you are using.
###Bug: uninitialized variables###
You didn't initialize sharp
and flat
to false
, so they could randomly be true
even when the note string doesn't contain any sharp or flat symbols. You should make a habit of initializing all your local variables to avoid these kinds of problems. Also, some compilers will warn you about uninitialized variables if you turn on full warnings, so you should look into how to do that for the compiler you are using.