All pastes #578516 Raw Edit

Anonymous

public c v1 · immutable
·published 2007-06-20 09:37 UTC
rendered paste body
#include<windows.h>#include<stdio.h>int x;int threadone(){    while(1)    {    x++;    printf("T1: %d\n",x);    sleep(500);}return;}int threadtwo(){    while(1)    {    x++;    printf("T2: %d\n",x);    sleep(500);}return;}int main(){    CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&threadone,NULL,0,0);    CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&threadtwo,NULL,0,0);    getch();    return;}