Back to posts.

C/C++ Snippets

A growing collection of tiny C/C++ snippets I want to remember.

Make sure a valuable is divisible by 4

while ( 0 != (width & 0x03)) {
  ++width;
}