Added C++ reference code