This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Comparing strings in an if statement



Here's my code:

if (native_units == "PSI")

native_units is a pointer to a string, and I've included it the string class "string.h", but the statement doesn't work as intended.  Whats the right way to code this?

Thanks,

-Ken