Fixed C++ file compilation, added C++ example