(C语言)为什么我这样调用线程里的结构体参数会报错 50
structtest{longb[NUM];longlleft;longrright;};unsigned__stdcallFirstThreadFunc(void*ar...
struct test
{
long b[NUM];
long lleft;
long rright;
};
unsigned __stdcall FirstThreadFunc(void*arg)
{
int left=first->lleft;
int right=first->rright;
fun(b,left,right);
}
int main()
{
a数组之前已经设好
unsigned threadID[4];
struct text first;
first.b=a;
first.lleft=0;
first.rright=c1-1;
hThread[0]=(HANDLE)_beginthreadex(NULL,0,FirstThreadFunc,(void*)&first,0,&threadID[0]);
很多东西我省略了,就是不明白为什么会一直提示我
error C2065: 'first' : undeclared identifier
left of '->lleft' must point to class/struct/union
left of '->rright' must point to class/struct/union
诸如此类很多。。。
到底该改哪里?各位老师麻烦指导下,谢谢!! 展开
{
long b[NUM];
long lleft;
long rright;
};
unsigned __stdcall FirstThreadFunc(void*arg)
{
int left=first->lleft;
int right=first->rright;
fun(b,left,right);
}
int main()
{
a数组之前已经设好
unsigned threadID[4];
struct text first;
first.b=a;
first.lleft=0;
first.rright=c1-1;
hThread[0]=(HANDLE)_beginthreadex(NULL,0,FirstThreadFunc,(void*)&first,0,&threadID[0]);
很多东西我省略了,就是不明白为什么会一直提示我
error C2065: 'first' : undeclared identifier
left of '->lleft' must point to class/struct/union
left of '->rright' must point to class/struct/union
诸如此类很多。。。
到底该改哪里?各位老师麻烦指导下,谢谢!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询