+ 1
Sublime 3 as c++ editor?
I've been using VS until now, but I really want to switch to Sublime as I run both a Linux and Windows enviroment, and also use Sublime for LaTeX. Any of you have experience with the setup process in Sublime to use it to code/compile C++? Ive been browsing the web for information, but it feels a little overwhelming.
1 Answer
+ 3
You can write your code in sublime and save the file with a .cpp extesion. You can then use your terminal to compile and run it.
For that you will need to install the G++ compiler. You can get that from here: https://gcc.gnu.org/releases.html
Once you got it installed, you are ready to go!
You just write your code in Sublime and save the file, let's suppose that you save it as main.cpp.
You just open the Terminal (Or CMD if you're on Winshit) CD into the file directory and run: g++ main.cpp -o main
That command will compile your code and create an .exe file called "main".
The -o stands for "output" and that's going to be the name of your .exe
The main.cpp stands for the name of the file that contains your C++ code