Fixed else syntax error
Merge pull request #318 from amree/fix-cpp-example

Fixed C++ example syntax error