In case you only display prices only if the customer is logged in , this modification is a must.
By default, even if the prices arent displayed for the unlogged customers, they become visible if the visitor adds them to cart.
Make this modification only if the above case applies to you, and the header cart will be hidden until the customer logs in.
Edit the file catalog/view/theme/yourtheme/template/common/header.tpl and find the line:
and replace it with:
<?php echo $cart; ?>
<?php } ?>