How to build and run c++ programs in Sublime Text 2, Windows 8?
First, make sure you save the file you're working on, wherever on your drive, before building and running.
Sublime Text 2 needs g++, bash, etc in order to compile. These packages need to be installed on your computer, as per the instructions on this page:
http://mjiang.com/mec/cs244/files/Installing%20c++_g++_on_Windows.pdf
For WINDOWS:
If you have Dev C++ (Bloodshed) then,
OPEN SUBLIME TEXT 2 and creat a new file to write your code (change build system to c++ through Tools> Build System> C++
as SublimeText2 doesn't come with build-system for c
)
After that, you save that file to bin
folder contained in Dev-Cpp
folder and press ctrl+b
If your code is correct (bug free) then you'll found a corresponding file (in .exe
format) on same directory which will show you
Hello World!
REMEMBER: SUBLIME TEXT 2 is an Editor, not a COMPILER