Is it possible to use c++ to edit a text file. By this I mean is there a way to have the program "write" something in a text document. For example would it be possible to have if x=1 have the program "write" hello or something along those lines in a text document.

Thx