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
You must install MinGW, then add path to MinGW to PATH variable.