C++ Get binary value of a buffer
You can perform some bitwise operations:
unsigned int converter(const char buffer[4]) {
return (buffer[0] << 24) |
(buffer[1] << 16) |
(buffer[2] << 8) |
(buffer[3]);
}
Example Here
You can perform some bitwise operations:
unsigned int converter(const char buffer[4]) {
return (buffer[0] << 24) |
(buffer[1] << 16) |
(buffer[2] << 8) |
(buffer[3]);
}
Example Here