int utstrlen(char* src){
int length=0 ;
if(isOurs(src) ==1){
length = src - 2 * sizeof(int);
}
return length;
}
I got the warning C4047: ‘=’ : ‘int’ differs in levels of indirection from ‘char *’ error from line length = src - 2 * sizeof(int); can someone explain what’s wrong with it? Thank you!
Based upon your previous question, you want
although that assumes no padding. A better way would be to use
offsetof():I am assuming you are using the struct from your previous question.