c++ - I have a character array, i want to shift the bits of it at binary level in right direction by one? -


i have character array, want shift bits of @ binary level in right direction one?

char arr[]="this array"; 

like above array represented in memory in binary form '110010101001110101......' want have program shift whole array?

just use << operator:

 char arr[]="abc";   cout <<   *(bitset<24>*)arr         << endl;  cout <<  (*(bitset<24>*)arr << 1)   << endl; 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -