run cmd command c++
#include <iostream>
using namespace std;
int main() {
system("DATE");
return 0;
}
run cmd command c++
#include <iostream>
using namespace std;
int main() {
system("DATE");
return 0;
}
c++ compile to exe command line
gcc sourcefile_name.c -o outputfile.exe
run c++ in command prompt windows
/* Run C++ in cmd */
1. Download, install the compilerand and edit Environment Variables.
2. Type the C/C++ program and save it.
3. Open the command line and change directory to the particular one where
the source file is stored
4. To compile, type in the command prompt: //an exe file will be generated
gcc sourcefile_name.c -o outputfile.exe
Ex: gcc HelloWorld.c -o HelloWorld.exe
5. To run the code, type:
outputfile.exe
Ex: HelloWorld.exe
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us