I have something like:
int8_t value; value = -27; std::cout << value << std::endl;
When I run my program I get a wrong random
It looks like it is printing out the value as a character - If you use 'char value;' instead, it prints the same thing. int8_t is from the C standard library, so it may be that cout is not prepared for it(or it is just typedefd to char).