Skip to content

Instantly share code, notes, and snippets.

@sms420
Created June 26, 2009 23:04
Show Gist options
  • Save sms420/136809 to your computer and use it in GitHub Desktop.
Save sms420/136809 to your computer and use it in GitHub Desktop.
//realSimpleClockProgram.cpp
//for KT Monda and his crazy experiment
#include <iostream>
#include <ctime>
#include<fstream>
using namespace std;
int main()
{
ofstream button_E;
ofstream button_I;
button_E.open("button_e.txt");
button_I.open("button_i.txt");
char INPUT;
int end=0;//this will be 1 when menu completes
do
{
cout << "Click e or i: ";//print us some options
cin >> INPUT;
if (strncmp (&INPUT,"e",1) == 0)
{ button_E << clock() << endl; }
else if (strncmp (&INPUT,"i",1) == 0)
{ button_I << clock() << endl; }
else
{ end = 1; }
}while(end!=1);//keep on rolling til !e & !i
return 0;
}//end application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment