Using threads.

Using threads.

CreateThread

See version :

Pas de dépendances

Download :

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

unsigned long WINAPI fonc1(void* params)
{
    while(1)
    {
        printf("1\n");
    }
    return 0;
}

unsigned long WINAPI fonc2(void* params)
{
    while(1)
    {
        printf("2\n");
    }
    return 0;
}

int main()
{
    HANDLE h1;
    HANDLE h2;
    h1=CreateThread(NULL,0,fonc1,NULL,0,0);
    h2=CreateThread(NULL,0,fonc2,NULL,0,0);

    system("PAUSE");
    //TerminateThread(h1,0);
    //system("PAUSE");
    return 0;
}



Explanations

	No explanations yet.