#include <iostream> #include <fstream> using namespace std; int main() { int i; ofstream out("CHARS", ios::out | ios::binary); if(!out) { cout << "Cannot open output file.\n"; return 1; } // write all characters to disk for(i=0; i<256; i++) out.put((char) i); out.close(); return 0; }