If you use an IDE use macros to speed up your writing. For example you can create a macro and press "Alt+c" and this line appears
In MS-VS I do it by going to Tools in menu bar and clicling on macro...Code:
cout << <<endl;
Enter a name
Type what you want to be recorded
You see the VB macro, close it.
Go to tools>macro...
In "Assign macro to" frame press keystrokes
In "Press new shortcut key" press the keys you want to be assigned.
Press assign button.