I am preparing for a programming contest where we have to code in C++ and it is all about producing working code in a short time. An example would be to use a macro to get the minimum of two ints or using memsets to initialize arrays (but I was told that you shouldn't use either here).This leads to the question, what kind of coding techniques exist to use at a real job?
General programming techniques to speed up coding time
c++
The way to produce working code fast is to... slow down. Take very small steps. Make sure you know what each step is for. Make sure that after each step your code compiles and runs.  Best of all, use Test-Driven Development. Write a failing test.  Write just enough code to make the test pass. Refactor to make the code clean, making sure it still passes all the tests. Repeat.  If you do not do this, then it is very easy to write a big pile of code, which does not work.  Then it will take you a very long time to figure out why it does not work.