Or of array values

I want the result as M0[0] = 0x61626380;
like oring of 0x61626300, 0x80, so it possible through operator | as i used below

1
2
3
4
std::array <unsigned int, 8> t_arr;
std::array<unsigned int, 16> M0 = {{0}};
key_arr[0] = 0x61626300;
M0[0] = ((key_arr[0]) | (1<<(7)));
Sure. You know there are online compilers for this sort of thing? http://ideone.com/Z9DCMU
Topic archived. No new replies allowed.