Search Results

Search found 1 results on 1 pages for 'user1078510'.

Page 1/1 | 1 

  • C++ MFC how to compare LPCTSTR in a if statement?

    - by user1078510
    I have the following code: LPCTSTR strPermission = Method(); if (strPermission == L"0") { return true; } else { return false; } While debugging I can see that strPermission does equal "0", yet when I compare it like in the if statement it always returns false. The only thing I can think of is that it is comparing the memory address of the variable rather than the variable value. How do I compare strPermission to L"0" so that it would return true if strPermission equals "0". Thank you!

    Read the article

1