I'm iterating over a char* as follows, but on the line indicated, I'm getting error C2446 '!=' no conversion from char* to int.
int errorLineNumber = 0;
char* json; //this is a long json with multiple \n's in it.
int offset = errorOffset;
char* p = json + offset;
while (*p-- != '\n' && offset--); //check that this gives offset on that error line and not char position of end of last line before error
errorLineOffset = errorOffset - offset; //get offset on error line only
//count lines to json error
long errorLineNumber = 0;
while (*p!= json) //this is error line
errorLineNumber += *p-- == '\n';
I looked at conversion const char to tchar, but it's a little different, and I also looked at conversion const char to int, which I still don't think is the same issue, unless I'm missing something.
That would be great if someone had a good idea what I'm missing. Thanks!