Is it safe to compare strings with == operator or is .compare recommended?
One of my teachers said NOT to use the == operator and always use a function when available. The example given was somthing along the lines of "when cpu is under high usage the == operator behaviour is unpredictable and will return false on the same two strings..."
Another C++ teacher in another situation said something along the lines of "it's easier to convert a char*array to the string class and use == instead of strcmp function."
I know both are talking about different things but I'm confused about the == issue.