// This program writes data to a file. #include #include using namespace std; int main() { ofstream outfile; // instantiate file pointer object outfile.open("public_radio.txt"); // associate file with file pointer object cout << "Writing to the file ... "; outfile << "KCMP\t" << 89.3 << endl; outfile << "KNOW\t" << 91.1 << endl; outfile << "KSJN\t" << 99.5 << endl; outfile.close(); // close the file! cout << "Done!" << endl; return 0; }