I want to run a C++ program in VS Code. All I get from Google is that click on run and debug (the play button) on top right in VS Code and my program will be up and running. I don’t want to do from that. I want to do it from terminal.
Example, to run:
- A Python file I do:
python3 fileName.py
- A Flutter program:
flutter run
- A Java file:
javac fileName.java
- A Go file:
go run fileName.go
Is there any command similar like this in C++?
Apologies, I know my question is a little naïve.
2
Answers
I need to be in my project directory and then i need to run
so this was what I was looking for
i guess the short answer would be :
In place of replace it by any name like myprogram, etc.
./myprogram
This mean you had to install gcc compiler beforehand.