The examples are in the 'examples' directory when you download the Connector/C++ source code, for example in version 1.1.3 available here: http://dev.mysql.com/downloads/connector/cpp/
Choose source code instead of operating system in the dropdown menu.