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.
CodePudding user response:
i guess the short answer would be :
$ g -o < name-you-want-to-give> source.cpp
In place of replace it by any name like myprogram, etc. ./myprogram
This mean you had to install gcc compiler beforehand.
CodePudding user response:
I need to be in my project directory and then i need to run
g 01inputFromUser.cpp -o 01inputFromUser && "/home/aman/Desktop/arjun/cpp/"01inputFromUser
so this was what I was looking for
g fileName.cpp -o fileName && "/path/to/project/"fileName