(SOLVED)Help with ISO C++ forbids comparison between pointer and integer.

The error is here: for(i = 0; i < &buflen; i++)

Can you provide a link to where you got this code?

The address of buflen is a pointer to buflen, so the comparison with "i" is invalid.