main.cpp
1 #include <iostream> 2 #include <windows.h> 3 4 using namespace std; 5 6 void Usage(); 7 8 int main ( int argc, char* argv[] ) { 9 if ( argc != 2 ) { 10 Usage(); 11 return -1; 12 } else { 13 Sleep ( atoll ( argv[1] ) ); 14 return 0; 15 } 16 } 17 18 void Usage() { 19 cout << "Usage: sleep NUMBER" << endl; 20 cout << "Pause for NUMBER millisecond." << endl; 21 }