I could not understand following problem, please enlighten me:
I am running a program in FC9 (gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)), it is running fine except that the std::string compare does not work. It got a wrong return of std::string compare value, but works to C compare. Please see following a debug printf statement:
I don't think it is a problem of the std::string compare at all, I suspect it might be some data crapsed in my program, but the program is running perfect if I use the C string compare function. I could not figure out what was happen. Any thoughts and comments please?
From what I understand you are trying to do, it appears it should work fine, just as you have it written, so my suspicion is that there is something wrong with your value for path.