Skip to main content
added 59 characters in body
Source Link
KIIV
  • 4.9k
  • 1
  • 14
  • 23

There is a HUGE difference between "string" and 'c' 'h' 'a' 'r'.

You are comparing address of string "T" with the numerical value of character 'T'.

The expression: if (value == 'T') will be much better.

There is a HUGE difference between "string" and 'c' 'h' 'a' 'r'.

You are comparing address of string "T" with the numerical value of character 'T'.

There is a HUGE difference between "string" and 'c' 'h' 'a' 'r'.

You are comparing address of string "T" with the numerical value of character 'T'.

The expression: if (value == 'T') will be much better.

Source Link
KIIV
  • 4.9k
  • 1
  • 14
  • 23

There is a HUGE difference between "string" and 'c' 'h' 'a' 'r'.

You are comparing address of string "T" with the numerical value of character 'T'.