S
Shane Peck
I am having a problem using the strcmp function. If I debug my program from
within Visual C++, strcmp returns 0 as I want, but if I build the project
and then try and execute it, it seems to think the strings are different.
I've got no idea why!! Any help appreciated, heres my code :
AfxMessageBox( param, MB_OK, 0 );
char *wow = "!";
if( stricmp( param, wow ) == 0 )
{//the parameter is !, so the line is a comment, skip over it
AfxMessageBox( "Got a comment", MB_OK, 0 );
The message box that I put before the comparison outputs an !, so I really
have no idea why it's returning non-zero. I've also tried memcmp, and it
gives the same result.
Thanks for any help...
within Visual C++, strcmp returns 0 as I want, but if I build the project
and then try and execute it, it seems to think the strings are different.
I've got no idea why!! Any help appreciated, heres my code :
AfxMessageBox( param, MB_OK, 0 );
char *wow = "!";
if( stricmp( param, wow ) == 0 )
{//the parameter is !, so the line is a comment, skip over it
AfxMessageBox( "Got a comment", MB_OK, 0 );
The message box that I put before the comparison outputs an !, so I really
have no idea why it's returning non-zero. I've also tried memcmp, and it
gives the same result.
Thanks for any help...