Hi,
I've a lot of troubles working with the memcmp command. I want to compare two strings, which are equal, but the programm tells me that they are not equal. Both memory locations have the same values.
unsigned char *pdata; const char *pName; //do some stuff - e.g. get their values memcmp((void *)pdata, (void *) pName, strlen((const char *)pName));
best regards Howard
You say that both memory locations have the same values. But does the memory region pointed at by pName contain a terminating zero within the buffer, so you don't perform a memcmp() of two much larger memory regions than you think?