2024年3月20日发(作者:)

#define _CRT_SECURE_NO_WARNINGS

#include

#include

#include

#include

int flag = 0;

int *addrfind = NULL;

struct mystruct

{

int *pfindstart;

int length;

int num;

int bh;

int *pflag;

int **addr;

};

void find(void *p)

{

struct mystruct *pstruct = (struct mystruct *)p;

for (int *px = pstruct->pfindstart; px < pstruct->pfindstart + 100; px++)

{

if (*(pstruct->pflag) == 1)

{

printf("第%d个线程无能已被其它线程找到n", pstruct->bh);