Updated example and README.md to use C++ syntax