File input and output: the ability to read and write to file(s). Files can be used to save and store data for later use. ex: word processors, image editors, spreadsheets, games, web browswers, system settings, etc.
- ifstream fin; - fin.open("input_file.txt"); - fin.fail(); - fin >> readValue; - fin.close();
- ofstream fout; - fout.open("output_file.txt"); - fout.fail(); - fout << outputVar << "output string\n"; - fout.close();