Hey,
Does anyone know why this bitfield integer is -1
1 2 3 4 5 6 7 8 9
|
int my_int : 1;
my_int = 1;
std::cout << my_int << std::endl;
//here it outputs -1
my_int = 0;
std::cout << my_int << std::endl;
//here it outputs 0
|
can anyone help?
Last edited on