Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Append to a binary file in C++

#include <iostream>
#include <fstream>

using namespace std;

int main()
{
  ofstream outFile("ForgetCodeWrite.out");

  if (outFile.fail()) {
    cerr << "Unable to open file for writing." << endl;
    exit(1);
  }

  outFile << "ForgetCode!" << endl;

  outFile.close();

  ofstream appendFile("ForgetCodeWrite.out", ios_base::app);

  if (appendFile.fail()) {
    cerr << "Unable to open file for writing." << endl;
    exit(1);
  }

  appendFile << "Appending Features!!" << endl;

  appendFile.close();
}