I would like to run through the entire range of unsigned char in a for loop. Say I want to print all numbers from 0 to 255, how should I go about accom
unsigned char
for
You can break it up:
for (unsigned char i = 0; i < 16; ++i) { unsigned char base=i*16; for (unsigned char j = 0; j < 16; ++j) { unsigned char val=base+j; std::cout << val << std::endl; } }