📂 C++ File I/O (Input/Output)

C++ can write to and read from files using <fstream>. We use ofstream to write, ifstream to read.

📚 Example: Writing & Reading a File

Console output will appear here...
💡 Pro Tip: Always close your file streams after you're done. Open files lock resources until they're closed.

🔧 Syntax Breakdown