These examples are taken from MSDN and adopted for GCC.