So I have a simple cpp file. Only one with one main function and 3 int a-la public variables. like:
int a;
int b;
int c;
void main()
{
startThredA();
startThredB();
while(1)
{
c = a + b;
printf(c);
}
}
I whant to create 2 threds A and B one of which should generate random value for A and another random value for b. How to do such thing?