Fastest way to write & compile a C/C++ program in Windows

Use TCC : Tiny C Compiler

  1. start a command prompt
  2. cd wherever
  3. notepad main.c
  4. write code in notepad. save
  5. back in the command prompt type tcc -run main.c
  6. notice errors, go back to 4

Note that with -run parameter you're invoking tcc like an interpreter


"really, really quick (and dirty, throw away?) programming "?

  • Compiler : VC++ command line - you already have it.
  • Editor: Notepad or somesuch
  • Compilation process: A .BAT file you write once and supply a parameter with the name of the single source file.
  • Location: Set up some desktop shortcuts to a known directory for your test code.

I'm looking for a program which is suitable for a really, really quick programming in Windows. Such as, copying some code from an SO question and executing it and seeing it's output.

For quick-and-dirty experimental coding, I really like codepad.org. Not having to create a file is especially nice as it saves me from coming up with a suitable name and disk location. Be aware that it uses g++ 4.1.2 behind the scenes so some of the latest C++11 features aren't supported.