From 5194937e767d3a62a0e05af14263908fcac82b2f Mon Sep 17 00:00:00 2001 From: "jorge.l.martinez" Date: Fri, 25 Mar 2022 09:08:44 -0400 Subject: [PATCH] fixed typo --- cheatsheet-as-sourcefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheet-as-sourcefile.cpp b/cheatsheet-as-sourcefile.cpp index 0d3dedd..9ebf2f4 100644 --- a/cheatsheet-as-sourcefile.cpp +++ b/cheatsheet-as-sourcefile.cpp @@ -366,7 +366,7 @@ if (f1) // Test if open and input available f1 >> x; // Read object from file f1.get(s); // Read char or line f1.getline(s, n); // Read line into string s[n] -ofstream f2("filename"); // Open file for writing +ifstream f2("filename"); // Open file for writing if (f2) f2 << x; // Write to file // ## `string` (Variable sized character array)