How to Compile and Run C++/C Programs in Linux

Опубликовано: 15 Октябрь 2024
на канале: Primal Penguin
1,195
14

Link to sublime: https://www.sublimetext.com/docs/3/li...

Instructions to add the C++ system build:
1. Go to Tools - Build System - New Build System
2. Remove the given code and replace it with the one in the comments section.
3. Go to File - Save and rename it and then save the file.

Code to install g++:
(Debian based) sudo apt-get install g++

Code to access file locaton:
cd /path/to/file

Code for C++:
to compile: g++ -o filename filename.cpp
to run: ./filename

code for C:
to compule gcc -o filename filename.c
to run: ./filename