This method works without an internet connection and does not expose you to code.
<ctrl>+<alt>+T <-- 0) opens a terminal vi test.cc <-- 1) hackery ... g++ -Wall -Wextra test.cc && ./a.out <-- 2) compile + run rm test.cc <-- 3) clean up (optional)
Replace vi favorite editor or cat . It can not be less intrusive.
Some editors, such as SciTE , have very simple base code (btw btw: SciTE has shortcuts to directly compile and run code from within the editor).
Btw: QtCreator gives a decent "intellisense", and the project files are minimal. For such a single-function test, one line of the project file is enough.
unkulunkulu indicates that you can also replace step 2 as follows ( itโs better not to have a Makefile in your test folder, it may contradict your existing goals in ):
<ctrl>+<alt>+T <-- 0) opens a terminal vi test.cc <-- 1) hackery ... make test && test <-- 2) compile + run rm test.cc <-- 3) clean up (optional)
It has a tiny flaw in that the g ++ message about additional arguments (e.g. -Wall or -std=c++0x is a bit more intrusive).
source share