superlint/test/linters/cpp/cpp_good_01.cpp

19 lines
308 B
C++
Raw Permalink Normal View History

// Copyright 2021 GitHub
#include <fstream>
#include <iostream>
#include <string>
using std::string;
int main() {
// Create and open a text file
ofstream MyFile("filename.txt");
// Write to the file
MyFile << "Files can be tricky, but it is fun enough!";
// Close the file
MyFile.close();
}