filesystem
#include <fstream>
int main() {
std::ofstream file("myfile.txt");
file << "Hello, world!";
file.close();
return 0;
}#include <fstream>
int main() {
std::ofstream file("myfile.txt", std::ios::app);
file << " This is a new line of text.";
file.close();
return 0;
}