for loop variable

Is there a way to save each byte to a different variable in a for loop?

for (int i = 24; i >= 0; i=i-8)
{
temp = ((memory[2027] >> i)& 0xFF);
cout << hex << temp << " ";
}
Maybe use an array.
Topic archived. No new replies allowed.