command line run c++ program code example
Example 1: run cmd command c++
#include <iostream>
using namespace std;
int main() {
system("DATE");
return 0;
}
Example 2: c++ compile to exe command line
gcc sourcefile_name.c -o outputfile.exe