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
Using boost::irange could be considered elegant (live example):
#include #include int main() { for(auto i : boost::irange(0, 256) ) std::cout << i << "\n"; return 0; }