c++ - Convert vector of uint8 to string -


i have pointer vector of type uint8.

how take pointer , convert data in vector full string representative of content?

you initialize std::string sequence obtained std::vector<uint8_t>:

std::string str(v->begin(), v->end()); 

there no need play tricks checking whether std::vector<uint8_t> empty: if is, range empty. however, might want check if pointer v null. above requires points valid object.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -