Skip to content

Instantly share code, notes, and snippets.

@bytepicker
Created December 4, 2015 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bytepicker/067c3a0b710b8a3067f9 to your computer and use it in GitHub Desktop.
Save bytepicker/067c3a0b710b8a3067f9 to your computer and use it in GitHub Desktop.
/******************************
* floppy plays the beginning
* of the Imperial March
******************************/
#include <fstream>
#include <windows.h>
#include <iostream>
#include <string>
using namespace std;
void beef(int, int);
int main()
{
// show them the Dark Side
ifstream ifs("dart.txt");
if(!ifs)
{ cerr << "Error openning\n"; }
string str;
while(getline(ifs, str))
{ cout << str << endl; }
beef(4, 4); beef(4, 4); beef(4, 4);
beef(3, 3); beef(1, 1); beef(4, 4);
beef(3, 3); beef(1, 1); beef(8, 8);
beef(4, 4); beef(4, 4); beef(4, 4);
beef(3, 3); beef(1, 1); beef(4, 4);
beef(3, 3); beef(1, 1); beef(8, 8);
return 0;
}
void beef(int nMax, int tDelay){
ofstream os;
for(int i=0; i<nMax; i++){
os.open("a:test.txt", ios::binary);
};
Sleep(tDelay*130);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment