converted to c++

Added pause to stop it from closing the terminal on Windows systems.
Will use a platform-agnostic approach on next release.