开发者

c++ find char in vector of unsigned chars

I have the problem with the following code:

message is vector<unsigned char>

vector<unsigned char>::iterator pos = message.begin();
vector<unsigned char>::iterator start = message.begin();
vector<unsigned char>::iterator end = message.end();

pos = find(start, end, ' ');

I got the error:

error: no matching function for call to ‘find(std::vector<unsigned char>::iterator&, std::vector<unsigned char>::itera开发者_如何学Gotor&, char)’


Are you including <algorithm>?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜