Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

###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.

Source Link
JS1
  • 28.8k
  • 3
  • 41
  • 83

###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.

lang-c

AltStyle によって変換されたページ (->オリジナル) /