Crazy Created Time Source Code C++

11/05/2012 02:51 slanjoy#1
/* Declarasi */
static time_t TimeValue;
static tm* timeinfo;
char ChekCrazyTime[999999];

/* Source Code */
void CPanel_Detect_Day_Validator()
{
time_t current_time;
time (&current_time);
current_tm = localtime (&current_time);
sprintf( ChekCrazyWaktu, " [ %d:%02d:%02d ]",current_tm->tm_mon+1,current_tm->tm_mday,current_tm->tm_year-100+2000);
}

/* Aktivikasions */

CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)CPanel_Detect_Day_Validato r, NULL, NULL, NULL);


By : KilluaCrazy << Gery Slanjoy >>
11/05/2012 15:05 マルコ#2
just... what????
pls describe this thingy there. And use code tags.
11/05/2012 17:33 .SkyneT.#3
Ok.

Btw:
Code:
static time_t TimeValue;
static tm* timeinfo;
char ChekCrazyTime[999999]; // Try to avoid global variables | any reason for the array size ?

void CPanel_Detect_Day_Validator() //DWORD WINAPI instead of void (read msdn about that)
{
time_t current_time;
time (&current_time);
current_tm = localtime (&current_time);
sprintf( ChekCrazyWaktu, " [ %d:%02d:%02d ]",current_tm->tm_mon+1,current_tm->tm_mday,current_tm->tm_year-100+2000);
}

/* Aktivikasions */

CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)CPanel_Detect_Day_Validato r, NULL, NULL, NULL); //small mistake with the blank
11/05/2012 18:25 Nightblizard#4
That's (bad) C.
In C++ it should look like this:

[Only registered and activated users can see links. Click Here To Register...]

See: [Only registered and activated users can see links. Click Here To Register...]
11/06/2012 15:31 Farmär#5
Very unnecessary..