How to build and run c++ programs in Sublime Text 2, Windows 8?

前端 未结 6 922
心在旅途
心在旅途 2020-12-29 10:50

I installed Codeblocks with mingw, chose default compiler, and could build and run a simple hello program without errors.

I installed Sublime Text 2, copy pasted the

6条回答
  •  误落风尘
    2020-12-29 11:16

    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

提交回复
热议问题