Top "Unsigned-char" questions

How to convert a double into an unsigned char?

I'm looking to change a vector of doubles into unsigned chars using c++. To make sure it works I wrote: …

c++ casting type-conversion double unsigned-char
Put bytes from unsigned char array to std::string using memcpy() function

I have std::string variable. And I need to put some bytes from array of unsigned chars to it. I …

c++ stl memcpy unsigned-char
Generating random unsigned char values in C++

I was wondering how to generate random unsigned char values. My idea; rand()%255; since unsigned chars support between 0-255. I …

c++ random unsigned-char
How to read in binary data and cast to unsigned char (C++)

I have a raw image file that is saved in binary data (no encoding). I want to read in the …

c++ binary-data unsigned-char
Convert QByteArray to std::vector<unsigned char>

I tried to convert QByteArray to std::vector<unsigned char> using this code: unsigned char* buffer = (unsigned char*)…

c++ vector std unsigned-char qbytearray
Comparing unsigned char and EOF

when the following code is compiled it goes into an infinite loop: int main() { unsigned char ch; FILE *fp; fp = …

c comparison eof unsigned-char fgetc
What is the difference between char and unsigned char?

(Edited change C/C++ to C) Please help me to find out a clean clarification on char and unsigned char …

c char unsigned-char
Scanf unsigned char in hex

I am trying to change data in array, this is part of my code: u_char paket[100]; //here i put …

c hex scanf unsigned-char
Conveniently copy std::vector<unsigned char> to input stream (std::istream) object

I'm trying to make use of a function which comes in a 3rd party lib and expects an input stream …

c++ vector copy istream unsigned-char
Printing values of keypoint descriptor matrix opencv

I'm having some trouble printing the values of the descriptor matrix obtained through the use of the 'compute' method of …

c++ opencv matrix unsigned-char feature-descriptor