Patched subwin example to compile with C++ (just added a C style case)
Patched CMakeLists.txt so it sets examples' target language as C++ when building state-aware