Update system.cpp

Added native C++ support