tags:

views:

95

answers:

2

Is there a STL C++ class that works like QByteArray?

+1  A: 

A complete replacement, no. Depending on what you are using it for, std::vector may suffice well enough as a replacement.

Kip Streithorst
+4  A: 
std::string

or

std::vector<unsigned char>
SigTerm
std::string is not capable of holding data containing \0. It will stop at first occurence, so yes... std::vector would be best replacement
Kamil Klimek
@Kamil: -1 for that comment. It is entirely capable. For instance, `std::string(10, '\0')` is a string with ten \0 characters.
MSalters