To prepend an arbitrary string to the beginning of a set of lines, a rectangle command can be used. Select the region you want to work on, and type M-x string-insert-rectangle [enter] StringToPrepend [enter]
To create a macro, press 'C-x (', then the macro, then 'C-x )'. To run this macro, press 'C-x e'
To revert / reload a file, you can use C-x C-v Ret, which is 'find alternate file', but it begins with the current file's name in the minibuffer
To change the tab width for c/c++, type M-: to get an elisp evaluation line, then type (setq c-basic-offset 4) e.g. to get a tab width of 4