haha, I think you maybe someone that I know.
do you want be hacker?
You should know, hacker is such one, who like freedom and be helpful for someone else, not such one, who write virus and make attack to someone else. When you really like programming and want be hacker, you should maybe see this link:
http://www.catb.org/~esr/faqs/hacker-howto.html
when you want gut learn c/c++ you should use gcc compiler.
Within gcc compiler you can enter g++ -o exefilename programname.cpp // for example
then you will have an executeable file with name exefilename.exe unter windows, under linux he will named exefilename.out
To run this file, you should just type exefilename
when you want work with IDE, my suggestiong for you is DEV which using gcc compiler intern.
try this code:
#include <ctime>
#include <cstdlib>
#include <iostream>
using namespace std;
void getCurrentTime(int & h, int & m, int & s)
{
time_t curr;
tm local;
time(&curr); // get current time_t value
local=*(localtime(&curr)); // dereference and assign
if(local.tm_isdst == 1)
{
h = local.tm_hour;
m = local.tm_min;
s = local.tm_sec;
}
else
{
h = -1;
m = -1;
s = -1;
}
}
int main()
{
int h, m, s;
bool fail = false;
do
{
getCurrentTime(h, m, s);
// here is the time, at that you want to start some other program
// for example 19:55:00 - 19:55:05
// why s<5?
// the program to run take also some time, so
// it is better to set an guarantee
if(h == 19 && m == 55 && s<5)
break;
else if(h == -1 || m == -1 || s == -1)
{
fail = true;
break;
}
}while(true);
if(!fail)
{
cout<<"current time is "<<h<<":"<<m<<":"<<s<<endl;
作者: 30岁就改变 时间: 2009-11-3 03:37
You should know, hacker is such one, who like freedom and be helpful for someone else, not such one, who write virus and make attack to someone else.
support!!!作者: 西门庆 时间: 2009-11-3 03:37
You should know, hacker is such one, who like freedom and be helpful for someone else, not such one, who write virus and make attack to someone else.