Created
June 27, 2009 02:04
-
-
Save sms420/136862 to your computer and use it in GitHub Desktop.
clock for Kyle and Harvard Scientists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //reallySimpleClock.cpp | |
| //for KT_Monda | |
| #include <conio.h> | |
| #include <iostream> | |
| #include<fstream> | |
| #include <ctime> | |
| 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; | |
| while(1) | |
| { | |
| if(_kbhit()) | |
| { | |
| INPUT = _getch(); | |
| if (strncmp (&INPUT,"e",1) == 0) | |
| { button_E << clock() << endl; } | |
| if (strncmp (&INPUT,"i",1) == 0) | |
| { button_I << clock() << endl; } | |
| if(INPUT==27) // ESC | |
| break; | |
| }//closes _kbhit | |
| }//closes while | |
| return 0; | |
| }//closes program |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment