Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to compare string..

How to compare string..

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
22 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P prasad_som

    Come on Satish ! You are still not reading answers well and replying to our queries well. 1. What does not working mean ? You need to be very clear. 2. Have you taken in to consideration when using || operator second operand will be looked only when first is false?

    Shah Satish wrote:

    x1 is cstring and (mytext->contents)is a pointer..

    It should not matter here.

    Prasad Notifier using ATL | Operator new[],delete[][^]

    S Offline
    S Offline
    Shah Satish
    wrote on last edited by
    #21

    Hi Prasad !!! I am sorry for delay..The ocde is exactly right n its working now..The problem was in my software...But now its working properly.. Thanks man !!! Shah

    1 Reply Last reply
    0
    • M Maximilien

      if this does not work, split the CompareNoCase and the if in different statements and debug each statement separatly.

      bool b1 = (x1.CompareNoCase(s1)== 0);
      bool b2 = (x1.CompareNoCase(s2)== 0);
      if ( b1 || b2 )
      {
      }


      Maximilien Lincourt Your Head A Splode - Strong Bad

      S Offline
      S Offline
      Shah Satish
      wrote on last edited by
      #22

      Hi Maximilien !!! I am sorry for delay..The Code is exactly right n its working now..The problem was in my software...But now its working properly.. Thanks man !!! Shah

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups