C, The string surrounding C++ to " always creates a new char array.
What you just compared is the addresses of the two char arrays created separately, so of course they are different.
You must use the strcmp function to compare strings.
(Note, in most script languages, "a" == "a" is true.)
© 2024 OneMinuteCode. All rights reserved.