Histograms not being written

Even for the simple example in the root manual, I keep getting the same error:

The current directory (Rint) is not associated with a file. The object (hgaus) has not been written.[/quote]

Please tell me what I need to do differently.

ROOT Primer -> File I/O and Parallel Analysis -> Storing ROOT Objects
ROOT User’s Guide -> Object Ownership