locked
== doesn't work with character arrays? RRS feed

  • Question

  •                 if (ProcessName == ProcessToSearchFor)   // has never been true, doesn't work with char arrays?
                    {                   
                        Instance[j].PID = ProcessPID[i];
                        j++;
                        Beep(1250,50);
                    }

    I'm comparing two character arrays that read exactly the same thing. Character for character. Something isn't right =(

    Any ideas?
    Sunday, December 21, 2008 3:46 PM

Answers

  • try:

    if (strcmp(ProcessName, ProcessToSearchFor)==0)  

    • Marked as answer by Geminix86 Sunday, December 21, 2008 4:13 PM
    Sunday, December 21, 2008 4:10 PM

All replies

  • try:

    if (strcmp(ProcessName, ProcessToSearchFor)==0)  

    • Marked as answer by Geminix86 Sunday, December 21, 2008 4:13 PM
    Sunday, December 21, 2008 4:10 PM
  • I love you. Thank you. Woot, on to the next phase of the program! *cackles maniacally, running back into his office*
    Sunday, December 21, 2008 4:14 PM