I think macro's are what you're looking for,
Don't know exactly how to use it with 'cout' though