run c++ in cmd g++ code example Example: run cmd command c++ #include <iostream> using namespace std; int main() { system("DATE"); return 0; }