store output of c++ program in text file code example Example: how to output text in c++ std::cout << " Something ";