First example using C++