Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8513667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:38:22+00:00 2026-06-11T04:38:22+00:00

I am working on the visual studio c++ and using these lines in my

  • 0

I am working on the visual studio c++ and using these lines in my program.
Whenever i typed Get status , output is not “Good”. the output will always be “invalid command” independent of Cstring strText . first two conditions are not working .

Kindly help . It should be worked according to the input strText.

         if ( strText == _T("Get status") )
     { 
                     MessageBox(_T("Good")); 


     }
         else if ( strText == _T("change") )
     {
         MessageBox(_T("Bad")); 
     }
     else 
         {
             MessageBox(_T("Invalid Command")); 
         }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:38:24+00:00Added an answer on June 11, 2026 at 4:38 am

    CString::operator== performs an exact case-sensitive match. If there’s a mismatch in case or whitespace, then the strings will compare differently. I can’t tell what’s the problem in your case. Perhaps you could add L"[" + strText + L"]" to your messagebox, to see if there’s some whitespace you overlooked.

    In fact, even though CString claims to support Unicode, it doesn’t. Two Unicode strigns that are formally identical, but differ in normalization are considered distinct. L"ë" may not be equal to L"ë", according to CString if one is normalized and the other isn’t. Windows has the CompareStringEx API, which is the swiss-army-knife of string comparisions and can deal with such details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working in Visual Studio 2008 using c#. Let's say I have 2 xsd
I'm working on populating a combobox in visual studio 2005 using vb and I'm
I'm working with the the Release Candidate of Visual Studio 2010 using Wf4 to
I'm using Visual Studio 2008. I'm currently working with WPF and I'm using Edit->Format
I am working on a project ASP.net 4, MVC4(RC) using visual studio 11. I
First of all, I'm using Visual Studio 2010 (Visual C#) and ASP.NET. I'm working
I am using Moles in Visual Studio 2010, and has been working very well.
I am using the Visual Studio 2010 RC. Sometimes when I am working on
I am using working on a c++ application in Visual studio 2008 I have
We recently started using AnkhSVN subversion plugin for Visual Studio. Everything is working as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.